Dynatrace provides a VM extension to install OneAgent on Azure Virtual Machine Scale Set (VMSS). The extension doesn't include the OneAgent installer. Instead, it uses the Dynatrace REST API to download the latest version from the cluster, unless a default OneAgent version is configured. OneAgent updates are provided automatically.
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.
https://<your-active-gate-IP-or-hostname>:9999/e/<your-environment-id>/api
(the ActiveGate port is configurable)The Dynatrace VM extension is available for Windows and Linux in all public Azure regions.
Run the command below.
Replace all values marked with <...>
with your actual values.
az vmss extension set--publisher dynatrace.ruxit-n "<Extension-Type>"-g "<Resource-Group>"--vmss-name "<VMSS-Name>"--settings "{\"tenantId\":\"<Environment-ID>\",\"token\":\"<API-Token>\", \"server\":\"<Server-Url>\", \"enableLogAnalytics\":\"yes\", \"hostGroup\":\"<Host-Group>\"}"
When using the Azure CLI within PowerShell, you need to format the settings as a here-string.
--settings @'"{\"tenantId\":\"<Environment-ID>\",\"token\":\"<API-Token>\"}"'@
Parameter | Required | Description |
---|---|---|
Resource-Group | required | Name of the resource group on which the VM is deployed. |
VMSS-Name | required | Name of the VMSS where you want to install the extension. |
Extension-Type | required | For Windows-based VMs, use oneAgentWindows . For Linux-based VMs, use oneAgentLinux . |
tenantId | required | The environment ID as described in Prerequisites. |
token | required | The PaaS token as described in Prerequisites. |
server | optional | The server URL, if you want to configure an alternative communication endpoint as described in Prerequisites. |
enableLogAnalytics | optional | Set to yes if you want to enable Log Monitoring. |
hostGroup | optional | Define the host group to which the VM belongs. |
Update the VMSS virtual machines.
az vmss update-instances --instance-ids '*' --resource-group $CLUSTER_RESOURCE_GROUP --name $SCALE_SET_NAME
To check the deployment status, go to Deployment Status.
After installation is complete, restart your applications on the VMs. Immediately after restart, OneAgent will begin monitoring them.
Alternatively to the main installation methods, you can make the Dynatrace site extension part of your ARM templates.
Place the JSON configuration for a virtual machine extension in the VMSS resource, under extensions
in extensionProfile
.
Example:
{"type": "Microsoft.Compute/virtualMachineScaleSets","sku": {...},"name": "<VMSS-Name>","apiVersion": "2018-06-01","location": "centralus","properties": {"upgradePolicy": {...},"virtualMachineProfile": {"osProfile": {...},"storageProfile": {...},"networkProfile": {...},"extensionProfile": {"extensions": [{"name": "dynatrace","properties": {"publisher": "dynatrace.ruxit","type": "<Extension-Type>","typeHandlerVersion": "<Extension-Version>","autoUpgradeMinorVersion": true,"settings": {"tenantId": "<Environment-ID>","token": "<API-Token>","enableLogAnalytics": "yes"}}}]}}}}
Configure the JSON file.
{"name": "dynatrace","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>"},}}
Parameter | Required | Description |
---|---|---|
Resource-Group | required | Name of the resource group on which the VM is deployed. |
VMSS-Name | required | Name of the VMSS where you want to install the extension. |
Extension-Type | required | For Windows-based VMs, use oneAgentWindows . For Linux-based VMs, use oneAgentLinux . |
tenantId | required | The environment ID as described in Prerequisites. |
token | required | The PaaS token as described in Prerequisites. |
Extension-Version | optional | Required version1 of the extension. |
server | optional | The server URL, if you want to configure an alternative communication endpoint as described in Prerequisites. |
enableLogAnalytics | optional | Set to yes if you want to enable Log Monitoring. |
hostGroup | optional | Define the host group to which the VM belongs. |
o fetch the list of extension versions, run
az vm extension image list --name oneAgentLinux --publisher dynatrace.ruxit
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.
Restart the VMSS nodes via PowerShell, replacing all values marked with <...>
with your actual values:
Restart-AzureRmVmss -ResourceGroupName "<Resource-Group>" -VMScaleSetName "<VMSS-Name>"
Parameter | Required | Description |
---|---|---|
Resource-Group | required | Name of the resource group on which the Virtual Machine is deployed |
VMSS-Name | required | Name of the VMSS where you want to install the extension. |