Deploy OneAgent on Azure Virtual Machines

Dynatrace provides a VM Extension to install the OneAgent on Azure Virtual Machines. This allows to leverage the native deployment automation features using Azure Resource Manager (ARM).

Azure VM-Extension

Besides the extension, OneAgent can still be installed manually or by using any deployment automation tooling of your choice.

How the VM-Extension for OneAgent works

The extension doesn't include the OneAgent installer. Instead, the extension uses the Dynatrace REST-API to download the latest installer from the cluster, unless an OneAgent default version is configured.

Agent updates are provided automatically through the capabilities of OneAgent.


To use the extension, you need the Dynatrace Environment ID and API Token.

How to retrieve Environment ID and API Token

Environment ID

  1. Login with your Dynatrace account.

  2. Select Deploy Dynatrace from the navigation menu.

  3. Click the Set up PaaS integration button. Your environment ID appears in the Environment ID text box.

  4. Click Copy to copy the ID to the clipboard. You can do this at any time by revisiting this page.

API Token

The API token is used in combination with your environment ID to download OneAgent. Go to Deploy Dynatrace > Set up PaaS integration to access the InstallerDownload token. For security reasons, it's recommended that you create a discrete token for each environment.

To generate a new token

  1. Click the Generate new token button.

  2. Type in a meaningful name for your token. A meaningful token name might be the name of the platform you want to monitor (for example, azure, cloud-foundry, or openshift). To view and manage your existing tokens, go to Settings -> Integration -> Platform as a Service.

  3. Click Generate to create the token. The newly created token will appear in the list below.

  4. Click Copy to copy the generated token to the clipboard. You can do this at any time by revisiting this page and clicking Show token next to the relevant PaaS token.

Additional configuration parameters

  • Server Url If you're using Dynatrace Managed or your communication should be routed through a specific ActiveGate, you need to configure your custom communication endpoint.

The URL pattern for the API endpoint is as follows: https://<YourDynatraceServerURL>/e/<YourEnvironmentID>/api

<YourDynatraceServerURL> and <YourEnvironmentID> need to be replaced.

  • Optional Network zones
    To configure network zones, use the following installer arguments:
az vm extension set​
  --publisher dynatrace.ruxit​
  -n "oneAgentLinux"​
  -g "yourresourcegroup"​
  --vm-name "awesome-vm"​
  --settings "{\"tenantId\":\"myawesometenant\",\"token\":\"nope123\", \"installerArgs\":\"--set-host-group=example_hostgroup --set-infra-only=false --set-network-zone=<>\"}"

See network zones for more information.


Azure Resource Manager provides a consistent management layer to perform tasks through Azure PowerShell, Azure CLI, Azure portal, REST API, and client SDKs.

Adding to an existing Virtual Machine

  1. Navigate to an existing virtual machine

  2. Select Extensions and click Add.
    Add new extension

  3. Select Dynatrace OneAgent from the list of extensions.

  4. Provide the configuration parameters as required | Azure VM-Extension.

  5. Click OK to start the installation process. VM-Extension installation progress

Define extension within the deployment wizard

When creating a new Virtual Machine, the VM-extension can be configured within the deployment wizard.

Set VM-Extension during deployment

After OneAgent is installed, OneAgent immediately starts monitoring your virtual machine. You can check the deployment status within Dynatrace.

OneAgent deployment status

VM extension availability

  • The Dynatrace VM extension is available for Windows and Linux in all public Azure regions (including support for Classic Virtual Machines)
  • Coming soon: Azure Sovereign Clouds such as Azure Government, Azure China, as well as Azure Stack