Azure Monitor .NET Extension

The Azure Resource Monitor Extension works with the .NET Agent Extension Manager to capture and report metrics for any resource hosted in Azure.

Contents

This extension includes 3 files which will be extracted within the .NET Agent Extension Manager installation folder.

Prerequisites

Installation

  1. If you haven't already, download and install the .NET Agent Extension Manager to any Windows Server hosted on-premise or in Azure, which currently has the .NET Agent installed.
  2. Download the AzureMonitorExtension.zip file to any location. Important: Once downloaded, right-click the file, select Properties, then select the Unblock button.

  3. Create a new folder within the {.NET Extension Manager Install}/Extensions/ folder. We can name it according to the Azure Resource we want to pull metrics for. For example we'll name this one /AzureMonitor-ServicePlan123, because we're going to collect usage metrics for a particular Azure SerivcePlan/ServerFarm which hosts multiple Azure Web Apps.
  4. Extract all files from AzureMonitorExtension.zip and place them into the folder we just created.
  5. Follow the steps documented in the Microsoft link below to create an Active Directory application which the .NET Azure Monitor Extension can use to access the appropriate resource metrics.
    1. Name the application AppDExtensions
    2. Set both the Sign-On URI and AppID URI to http://appdynamics.com
    3. Take note of the Client ID, Client Secret Key, Tenant ID, and Subscription ID which we'll use later.
    4. https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/
  6. Run AppDynamics.Extension.Manager.exe and click Manage next to the AzureMonitor extension. Alternatively, you can use any XML editor to edit the extension.xml file
    • In the <extension>
    • tag, set the name property to reflect the Azure Resource you're pulling metrics from, for example AzureMonitor-ServicePlan123.
    • In the <instance>tag, set the name property to match the extension name, in this case AzureMonitor-ServicePlan123. Set the data property to match the appropriate Azure Resource ID you'd like to pull metrics from. Some examples listed below, and full documentation from Microsoft available here.
      resourceGroups/{resource-group-name}/providers/Microsoft.Devices/IotHubs/{iot-hub-name}/
      resourceGroups/{resource-group-name}/providers/Microsoft.Sql/servers/{pool-db}/elasticpools/{sql-pool-name}/
      resourceGroups/{resource-group-name}/providers/Microsoft.Sql/servers/{server-name}/databases/{database-name}/
      resourceGroups/{resource-group-name}/providers/Microsoft.ServiceBus/{namespace}/{servicebus-name}/ 
      resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachineScaleSets/{vm-name}/
      resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}/
      resourceGroups/{resource-group-name}/providers/Microsoft.EventHub/namespaces/{eventhub-namespace}/
      resourceGroups/{resource-group-name}/providers/Microsoft.Web/serverfarms/{service-plan-name}/
      resourceGroups/{resource-group-name}/providers/Microsoft.Web/sites/{app-service-name}/providers/Microsoft.insights/
      

      Be sure to update all highlighted fields below.
      Note: At this time, only one resource is supported per instance. If you need to pull metrics from multiple Azure Resources, you can copy the /Extensions/AzureMonitor-ServicePlan123/ folder we created in these steps, rename it, and then edit the extension.xml file to point at Azure resource #2.
    • Update your Client ID, Client Secret Key, Tenant ID, and Subscription ID within the <parameters> section so that the extension can authenticate with the Azure Portal and pull the appropriate resource metrics.
    • Now save your XML configuration and click Apply Changes in the .NET AppDynamics Extension Manager. This will recycle the Extension Manager Windows Service as well as the AppDynamics Agent Coordinator service.

    That's It!

    Your Azure Monitor metrics should begin to appear in the AppDynamics Metric Browser under Application Infrastructure|Performance|MachineAgent|Custom Metrics|Performance Monitor|AzureMonitor-ServicePlan123.

    You can now create custom dashboards to display these metrics in the Controller, or create health rules with alerts.