|
|
||
|---|---|---|
| BMW-Dynatrace-config | ||
| bin | ||
| onboarding/CD_newComponentTag | ||
| README.md | ||
| environment.yaml | ||
| onboard.sh | ||
README.md
BMW Monaco
Dynatrace - Get Started!
If you and your team want to monitor BMW's applications with Dynatrace, please follow these steps:
-
Make sure you have access to Dynatrace.
-
Clone this repository in your local machine. With this repo, you will be able to handle all the configuration of your application within Dynatrace.
-
Create a branch of the repo with the following name format: CD_"ApplicationName"
- ApplicationName should have the value of the provided annotation/property DT_CUSTOM_PROP.
-
Execute the onboard.sh script with the following parameters: ./onboard.sh CD_"ApplicationName" "ApplicationName" i.e. ./onboard.sh CD_Infotainment Infotainment
The script will automatically create:
- Management Zone: Used to filter entities. Can be used when navigating in the environment, creating dashboards and alerting profiles.
- Dashboards (PROD, E2E, INT): Based on a template, an initial dashboard with a general overview of the health of the application.
- Alerting Profile (PROD, E2E, INT): It's used to filter specific problems of your applications.
- Notification System: linked to your alerting profile to notify via email, MS Teams, ITSM, etc.
-
Open the notification.yaml under the notification folder and add the webhook of the MS Teams you want to be notified How to create an MS Teams webhook: https://www.dynatrace.com/support/help/shortlink/set-up-msteams-integration#configuration-in-microsoft-teams
-
Open the Component.json file (https://atc.bmwgroup.net/bitbucket/projects/OPAPM/repos/cd_e2e_monitoring_config/browse/BMW-Dynatrace-config/00_Global-Config/auto-tag/Component.json) and add a rule for your DB
-
Commit and pull request to merge the branch to the master.
Recommended: participate in one of the trainings given by a Dynatrace expert to understand how to use the tool in the most efficient way and the following configuration:
- (optional) Custom services
- (optional) Request Attributes
- (optional) Custom metrics
- (optional) Synthetics?
- (optional) Naming Rules (Services / Process Groups)
Important! All changes (in dashboards, alerting profiles or any type of configuration) must be done via a pull request. Changing a dashboard just in the environment, will cause that it will be overwritten by Monaco.
If you have any problems in the steps mentioned above, please contact opapm@bmw.de
(Dynatrace Admins) Testing Monaco - Tokens needed
This guide contain the steps to set up monaco and automatically onboard and application called "ABC" under the MZ "CD_ABC"
- Clone repository in your local machine.
- Define environment variables for the environment.yaml file. i.e. export xxu26128_TOKEN= Dynatrace API token Do the same for the rest of the environments. Follow this link to learn how to generate a token in Dynatrace.
- mv bin/monaco /usr/bin
- Execute the onboard.sh script with the following parameters: ./onboard.sh CD_ ApplicationName ./onboard.sh CD_ABC ABC
- To remove all CD_ABC configuration:
- Uncomment CD_ABC lines from delete.yaml.
- Execute monaco again to apply changes from delete.yaml: monaco deploy -e="environment.yaml" -p="CD_ABC" BMW-Dynatrace-config/
- Remove CD_ABC configuration folder
Results
- CD_ABC Management Zone created containing all entities with ABC tag.
- PROD/E2E/INT Dashboards for CD_ABC components.
- PROD/E2E/INT Alerting Profiles for CD_ABC components.
Update configuration
- Execute the following command:
monaco deploy -e="environment.yaml" -p="00_Global-Config" BMW-Dynatrace-config/
- Under -p you can select the configuration you want to update
Debugging
- set environment variable MONACO_REQUEST_LOG=mylogfile.log to see what exactly gets sent to DT
Download configuration
Configuration has been downloaded and set up under BMW-Dynatrace-config. It's not necessary to be downloaded again. To download the existing configuration for all tenants, execute the following commands: 1. cd downloaded-config 2. monaco download -e='../environment.yaml' To download the existing configuration for a specific tenant, execute the following commands: 1. cd downloaded-config 2. monaco download -e='../environment.yaml' -s EMEA-Prod
Automatic config environment variables
- source ./exports.sh