Dynatrace provides a VM Extension to install OneAgent on Azure Virtual Machines. This enables you to leverage the native deployment automation features using Azure Resource Manager (ARM). The Dynatrace VM extension is available for Windows and Linux in all public Azure regions (including support for Classic Virtual Machines).
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 a OneAgent default version is configured.
Create a PaaS token.
Determine your environment ID.
Determine your server URL if required.
The server URL is required only if you use either of the following:
(If you use Dynatrace SaaS, the URL is automatically generated from the environment ID.)
https://{your-domain}/e/{your-environment-id}/api
https://<your-active-gate-IP-or-hostname>:9999/e/<your-environment-id>/api
(the ActiveGate port is configurable)If you're using Dynatrace Managed, or if your cluster traffic should be routed through an ActiveGate, you need to configure the API endpoint used by the extension for downloading OneAgent.
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.
With the VM extension 2.201.1.0 release, you can set the overrideDefaults
parameter via CLI and PowerShell installation and via ARM template.
You can set the custom timeout (overrideDefaults
) for the Azure VM Extension download, which is helpful in environments with a suboptimal internet connection or smaller network throughput (bandwidth).
Your error messages became more informative, which is helpful in automated systems.
Updating the Azure VM Extension on Windows can now be done without uninstalling it first. If the OneAgent's version changes on the tenant, you just need to install the Azure VM Extension again to install this new version.
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.
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.
{"type": "extensions","name": "dynatrace","apiVersion": "2018-06-01","location": "[resourceGroup().location]","dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', <VM-Name>)]"],"properties": {"publisher": "dynatrace.ruxit","type": "<Extension-Type>","typeHandlerVersion": "<Extension-Version>","autoUpgradeMinorVersion": true,"settings": {"tenantId": "<Environment-ID>","token": "<API-Token>","server": "<Server-Url>","enableLogAnalytics": "yes","hostGroup": "<Host-Group>"},}}
When placing the extension JSON at the root of the template, the resource name includes a reference to the parent virtual machine, and the type reflects the nested configuration.
{"type": "Microsoft.Compute/virtualMachines/extensions","name": "<Parent-VM-Resource>/dynatrace","apiVersion": "2018-06-01","location": "[resourceGroup().location]","dependsOn": ["[concat('Microsoft.Compute/virtualMachines/', <VM-Name>)]"],"properties": {"publisher": "dynatrace.ruxit","type": "<Extension-Type>","typeHandlerVersion": "<Extension-Version>","autoUpgradeMinorVersion": true,"settings": {"tenantId": "<Environment-ID>","token": "<API-Token>","server": "<Server-Url>","enableLogAnalytics": "yes","hostGroup": "<Host-Group>"}}}
oneAgentWindows
. For Linux-based VMs, use oneAgentLinux
.2.200.0.0
version, it's recommended to pass it in protectedSettings
.yes
if you want to enable Log Monitoring.\"overrideDefaults\": {\"downloadInstallerRequestTimeoutInSeconds\": 600}
to the ARM template in the settings
object, you can also leave it empty \"overrideDefaults\": {}
, or null
. In such cases, the 120 seconds default value will apply.Available from VM extension version 2.201.1.0.
To check the deployment status, go to Deployment Status.
After installation is complete, restart your applications on the VM. Immediately after restart, OneAgent will begin monitoring them.
To configure network zones, use the installer arguments below.
az vm extension set--publisher dynatrace.ruxit-n "oneAgentLinux"-g "yourresourcegroup"--vm-name "awesome-vm"--settings "{\"tenantId\":\"myawesometenant\",\"token\":\"nope123\", \"installerArguments\":\"--set-host-group=example_hostgroup --set-monitoring-mode=fullstack --set-network-zone=<your.network.zone>\"}"
See network zones for more information.