cd_e2e_monitoring_config/README - Full.md

11 KiB
Raw Blame History

BMW Monaco

Dynatrace - Get Started!

Initial Setup

To monitor your application with Dynatrace, please follow these steps:

  1. Make sure you have access to Dynatrace. If not, follow this link

  2. Clone repository in your local machine:

    git clone https://atc.bmwgroup.net/bitbucket/scm/opapm/cd_e2e_monitoring_config.git

  3. Create branch using your Component/Application name with the following format:

    git checkout -b CD_ApplicationName

What value should i use for ApplicationName? Previously to the restart of your application to let the OneAgent collect the traces, one of the steps within the implementation checklist is to set up a variable called DT_CUSTOM_PROP. Please use the same value for the ApplicationName.

  1. Execute the script passing as parameters, again, the ApplicationName:

    ./onboard.sh CD_ApplicationName ApplicationName

  2. (optional) Configure Notification System

    • Dynatrace AI automatically detects anomalies in your applications and generate problems, visible within the UI. Dynatrace offers several out-of-the-box integrations with problem notification systems such as Email, MS Teams and ITSM.
    • Notification system is not configured by default. If you want to enable it for your application please follow this link.
  3. (optional) Add databases to Management Zone

    • The script described in step 5 will create the configuration for all entities related to your application (Host, Processes, Services) but not the databases.
    • To add your databases into Dynatrace you need to add an extra rule to the Component.json file. You can use this example to understand exactly what you have to do.
  4. Commit and pull request to merge the branch to the master:

    git add <changes> git commit -m "ApplicationName configuration changes" git push -u origin <branch>

Results

Once the pull request is approved and BMW Monaco executes, all the configuration created in the previous steps will be visible in Dynatrace:

Primary Configuration

  • Management Zone
    • Used to filter entities.
    • Can be used to navigate the environment, filtering in dashboards and alerting profiles.
    • You can use the generated MZ clicking on the filter at the top-right corner within the Dynatrace UI.
    • Learn how to configure/improve your Management Zone here (Do i need to configure it?)

Management Zone

  • Dashboards
    • Based on a template,
    • Initial dashboard with a general overview of the health of the application.
    • For Prod environements, PROD and E2E dashboards will be generated.
    • For PreProd environments, INT dashboard will be generated.
    • Learn how to configure/improve your Dashboards here (Do i need to configure it?)

Dashboard

  • Alerting Profiles

    • Used to filter specific problems related to your applications.
    • For Prod environements, PROD and E2E alerting profiles will be generated.
    • For PreProd environments, INT alerting profiles will be generated.
    • Learn how to configure/improve your Alerting Profiles here (Do i need to configure it?)
  • Notification System

    • For each Alerting Profile, it's possible to set up a separate Notification System.
    • For Prod environements, PROD and E2E notification systems will be generated.
    • For PreProd environments, INT notification systems will be generated.
    • Notification system is not configured by default. If you want to enable it for your application please follow this link.
    • Learn how to configure/improve your Notification System here (Do i need to configure it?)

Optional Configuration

The following configuration items are not set up by default. Learn the value that can provide to monitoring within the Dynatrace documentation (links shared below on each item) or in one of our trainings (recommended, BMW specific)

  1. (optional) Custom services
    • Short description: If your application services aren't built on standard technologies, they may not be recognized out-of-the box. You can monitor these technologies, but you'll need to define them as custom services with specific service entry points. Another use case for custom services are microservices that are used by a larger application that aren't exposed via communication technologies.
    • How to configure it in monaco?
    • Custom services - Dynatrace Documentation
  2. (optional) Request Attributes
    • Short description: Dynatrace tracks all requests, from end to end, and automatically monitors the services that underlie each transaction. The performance and attributes of each request can be analyzed in detail. You can even create custom multi-faceted filters that enable you to analyze call sequences from multiple perspectives. With such advanced request filtering, Dynatrace enables you to slice and dice your way through your requests to find the proverbial “needle in the haystack.” Such filtering isn't only possible on certain predefined attributes. You can also configure custom request attributes that you can use to improve filtering and analysis of problematic web requests.
    • How to configure it in monaco?
    • Request Attributes - Dynatrace Documentation
  3. (optional) Custom metrics
  4. (optional) Synthetics
    • Short description: Dynatrace Synthetic Monitoring makes it easy for you to monitor the availability and performance of your applications as experienced by your customers around the world and around the clock. Availability is the success rate at a given instant or time period that indicates if your application is fully functional and available to users.
    • How to configure it in monaco?
    • Synthetics - Dynatrace Documentation
  5. (optional) Naming Rules (Services / Process Groups)

Recommended

  • Participate in one of the Dynatrace trainings to understand
    • What kind of changes in the configuration are possible and how it's going to improve monitoring.
    • Hands on in how to work with Monaco
    • How to use Dynatrace in the most efficient.

Important

  • 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

This guide contain the steps to set up monaco and automatically onboard and application called "ABC" under the MZ "CD_ABC"

  1. Clone repository in your local machine.
  2. 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.
  3. mv bin/monaco /usr/bin
  4. Execute the onboard.sh script with the following parameters: ./onboard.sh CD_ ApplicationName ./onboard.sh CD_ABC ABC
  5. To remove all CD_ABC configuration:
    1. Uncomment CD_ABC lines from delete.yaml.
    2. Execute monaco again to apply changes from delete.yaml: monaco deploy -e="environment.yaml" -p="CD_ABC" BMW-Dynatrace-config/
    3. 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

  1. 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