In order to do more with less and scale, organizations must transcend IT silos, foster collaboration and improve productivity. Automation and a common data model are key components of this, but it takes platforms that support operational teams and workflows.

πŸ”· Review how Dynatrace integrates with Azure monitor

πŸ”· Review how Azure monitor metrics can be configured as Metric events for alerts

Referring to the picture below, here are the components for this lab.

image

#1 . Azure: Azure cloud platform where Azure services produce metrics that are sent to Azure monitor.

#2 . Azure VM running ActiveGate: A Dynatrace ActiveGate process required to monitor Azure monitor data.

#3 . Dynatrace: Dynatrace tenant where monitoring data is collected and analyzed.

#4 . Dynatrace Azure Dashboard: Out of the box dashboard for each configured Azure subscription.

Azure Dashboard

In addition to monitoring your Azure workloads using OneAgent, Dynatrace provides integration with Azure Monitor which adds infrastructure monitoring to gain insight even into serverless application scenarios.

The integration uses Azure Monitor metrics for service insights, as well as Azure Resource Manager (ARM) to gather metadata.

image

Review your environment

  1. From the left side menu in Dynatrace, click the Azure menu item.
  2. Scroll down, and in the Environment dynamics action click on the eastus region to open the virtual machine regional page

Virtual machine regional page

Notice the following details:

  1. A summary of type and status is shown
  2. A running average for virtual machines
  3. A table of host with Azure monitor metrics summarized. Notice that both VMs with and without an OneAgent are both shown

image

Virtual machine details

Click on the dt-orders-active-gate host to open the host page.

Notice the following details:

  1. Expand the properties to see more details
  2. All the Azure monitor metrics are viewable as time-series data

image

Dynatrace Davis automatically analyzes abnormal situations within your IT infrastructure and attempts to identify any relevant impact and root cause. Davis relies on a wide spectrum of information sources, such as a transactional view of your services and applications, as well as on events raised on individual nodes within your Smartscape topology.

There are two main sources for single events in Dynatrace:

Tasks to complete this step

  1. Setup Custom Metric Events for Alerting
    • To add custom alerts, navigate to Settings --> Anomaly Detection --> Metric Events menu.
    • Click the Add metric Event button. image
    • Fill in the below information on the Add metric event template
      1. Summary: CPU % percentage
      2. Type: Metric key from dropdown
      3. Metric key Azure CPU usage from dropdown image
      4. Agregation Average from dropdown
      5. Management zone dt-orders-monolith
      6. under Entities click on > to see Advanced dimension definition and select Azure VM from dropdown image
      7. Dymension filter click on Add dimension filter and select as shown below. image
      8. under Monitoring strategy section select as shown. image
      9. select the > next to Advanced model properties and input as shown. image
      10. In the Event template section add:
        1. Title: CPU CUSTOM ALERT
        2. Event type from dropdown: Custom alert
        3. Dimension key of entity for events select Azure VM from dropdown image
      11. click on Save Changes
    • Add another rule, with everything the same, except for the Event Description to have the title as CPU Resource Alert and Event type = RESOURCE as shown below. image
    • Save your changes and the list should look as shown below. image

Tasks to complete this step

  1. Trigger a CPU Problem
    • To enable a problem, you will go into the Azure Portal UI and use the Run Command feature to start a shell script.
    • From the Azure Portal, search for dt-orders-monlith VM from the search menu and select it. image
    • Once inside the VM resource page, click on Run Command under Operations from the left menu image
    • Next, click on RunShellScript and type in the command listed below in the Run Command Script window and click run
      /home/workshop/azure-modernization-dt-orders-setup/learner-scripts/run-cpu-prb.sh
      
      image
    • In the output window you should receive the following:image
  2. Review Dynatrace UI for Problem card
    • Back in Dynatrace within the host view, the CPU should now be high as shown belowimage
    • It may take a minute or so, but you will get two problem cards as shown below. #1 is the alert from the severity = RESOURCE where Davis was invoked, and #2 is the alert from severity = CUSTOM ALERT.image
    • Review Problem Notifications Settings
      • Navigate to Settings --> Integrations --> Problem Notifications
      • Read the overview and then click the Add Notification button
      • Click various Notification types from the drop down to review the configurations inputs.
      • For the Custom integration type, review the option to customize the payload.
      • Notice how you can choose the Alert profile, but you only have default as an option currently
    • Review Alerting Profiles
      • Navigate to Settings --> Alerting --> Alerting profiles
      • Read the overview and then expand the default rule.
      • Now add one, by clicking on the Add alerting profile button
      • Review the options to choose severity rules and filters
  3. Stop the CPU problem
    • To stop the problem, we will use the same Run Command feature in Azure Portal to execute stop shell script.
    • From the Azure Portal, search for dt-orders-monlith VM from the search menu and select it. image
    • Once inside the VM resource page, click on Run Command under Operations from the left menu
    • Next, click on RunShellScript and type in the following command listed below in the Run Command Script window and click run
      /home/workshop/azure-modernization-dt-orders-setup/learner-scripts/stop-cpu-prb.sh
      
      image
    • In the output window you should receive the following:image
    • Verify that CPU in Dynatrace goes to normal and the problem card will automatically close

🏫Class Note - Please update the Tracking Spreadsheet if you've completed the task on this step.

In this section, you should have completed the following:

βœ… Reviewed how Dynatrace integrates with Azure monitor

βœ… Reviewed how Azure monitor metrics can be configured as Metric events for alerts