Try it free

Microsoft Azure Arc-enabled servers

  • Latest Dynatrace
  • How-to guide
  • 4-min read
  • Published Dec 10, 2024

Capabilities

  • Full-stack monitoring powered by OneAgent
  • Extensions for easy deployment of OneAgent
  • Integration with Azure Monitor
  • Enhanced support for Azure VM metadata such as Azure regions, scale sets and more
  • Classic Virtual Machines are also supported

Prerequisites

  • Create a PaaS token.

  • Determine your environment ID.

  • Determine your server URL if required.

    The server URL is required only if you use an ActiveGate for a Dynatrace SaaS endpoint. The URL is automatically generated from the environment ID.

    • ActiveGate server URL:
      https://<your-active-gate-IP-or-hostname>:9999/e/<your-environment-id>/api (the ActiveGate port is configurable)

Install Dynatrace OneAgent VM extension

There are several ways to install the Dynatrace OneAgent VM extension: through Azure Portal, Azure CLI, or PowerShell, or by using an ARM template. Follow the steps below for instructions.

Add the extension to an existing VM

  1. In Azure Portal, go to an existing Azure Arc Machine resource.
  2. In the left menu, go to Settings > Extensions.
  3. Select Add.
  4. From the list of extensions, select Dynatrace OneAgent.
  5. Select Next to add the extension.
  6. On the Configure Dynatrace OneAgent Extension page, enter your Environment ID, your API Token, and your Server URL. See Prerequisites for details.
  7. Optional Define additional OneAgent settings (such as proxy, port).
  8. Select Review + create.
  9. To check the deployment status, in your Dynatrace environment, go to Deployment Status.
az connectedmachine extension create
--publisher "Dynatrace.Ruxit"
--type "<Extension-Type>"
--name “<Extension-Type>”
--resource-group "<Resource-Group>"
--machine-name "<Azure Arc Server Name>"
--location <Azure Region>
--settings "{\"tenantId\":\"<Environment-ID>\",\"token\":\"<API-Token>\", \"server\":\"<Server-Url>\", \"enableLogAnalytics\":\"yes\", \"hostGroup\":\"<Host-Group>\"}"
ParameterRequiredDescription
Resource-GroupRequiredName of the resource group on which the VM is deployed.
Azure Arc Server NameRequiredName of the machine extension.
Extension-TypeRequiredFor Windows-based VMs, use oneAgentWindows. For Linux-based VMs, use oneAgentLinux.
Extension-nameRequiredFor Windows-based VMs, use oneAgentWindows. For Linux-based VMs, use oneAgentLinux.
Azure RegionRequiredAzure Region of the resource
tenantIdRequiredThe environment ID as described in Prerequisites.
tokenRequiredThe PaaS token as described in Prerequisites.
serverOptionalThe server URL, if you want to configure an alternative communication endpoint as described in Prerequisites.
enableLogsAnalyticsOptionalSet to yes if you want to enable Log Monitoring.
hostGroupOptionalDefine the host group to which the VM belongs.

Alternatively to the main installation methods, you can make the Dynatrace VM extension part of your ARM templates.

The JSON file for a virtual machine extension can be nested inside the virtual machine resource, or placed at the root or top level of a resource manager JSON template. The placement of the JSON file affects the value of the resource name and type.

Example

The following example assumes the OneAgent extension is nested inside the virtual machine resource. When nesting the extension resource, the JSON file is placed in the "resources": [] object of the virtual machine.'

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "vmName": {
            "type": "string"
        },
        "location": {
            "type": "string"
        },
        "tenant": {
            "type": "string"
        },
        "token": {
            "type": "securestring"
        },
        "server": {
            "type": "string",
            "defaultValue": ""
        }
    },
    "resources": [
        {
            "name": "[concat(parameters('vmName'),'/<Extension-Type>')]",
            "type": "Microsoft.HybridCompute/machines/extensions",
            "location": "[parameters('location')]",
            "apiVersion": "2022-03-10",
            "properties": {
                "publisher": "dynatrace.ruxit",
                "type": " <Extension-Type>",
                "autoUpgradeMinorVersion": true,
                "settings": {
                    "tenantId": "[parameters('tenant')]",
                    "server": "[parameters('server')]"
                },
                "protectedSettings": {
                    "token": "[parameters('token')]"
                }
            }
        }
    ]
}
ParameterRequiredDescription
Parent-Arc Machine-ResourceRequiredName of the Azure Arc Machine resource where you want to install the extension. Not applicable when using nested resource.
Arc Machine NameRequiredName of the Azure Arc Machine where you want to install the extension.
Extension-TypeRequiredFor Windows-based VMs, use oneAgentWindows. For Linux-based VMs, use oneAgentLinux.
tenantIdRequiredThe environment ID as described in Prerequisites.
tokenRequiredThe PaaS token as described in Prerequisites. From Microsoft Azure Arc version 2.200.0.0, it's recommended to pass it in protectedSettings.
serverOptionalThe server URL, if you want to configure an alternative communication endpoint as described in Prerequisites.

To check the deployment status, in your Dynatrace environment, go to Manage > Deployment status.

After installation is complete, OneAgent will begin monitoring.

Related tags
Infrastructure ObservabilityAzure