• Home
  • Deploy Dynatrace
  • Set up Dynatrace on cloud platforms
  • Microsoft Azure
  • Integrations
  • Monitor Azure Virtual Machine Scale Set (VMSS)

Monitor Azure Virtual Machine Scale Set (VMSS)

Capabilities

  • Full-stack monitoring powered OneAgent
  • Extensions for easy deployment of OneAgent
  • Integration with Azure Monitor
  • Enhanced support for Azure VM Metadata such as Azure regions, AutoScale detection, and more

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.

Prerequisites

  • 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:

    • a Dynatrace Managed endpoint
    • an ActiveGate for a Dynatrace Managed or Dynatrace SaaS endpoint

    (If you use Dynatrace SaaS, the URL is automatically generated from the environment ID.)

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

Note: 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.

Installation

The Dynatrace VM extension is available for Windows and Linux in all public Azure regions.

  1. Run the command below.

    Note: Replace all values marked with <...> with your actual values.

    bash
    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>\"}"

    Note: When using the Azure CLI within PowerShell, you need to format the settings as a here-string.

    bash
    --settings @'"{\"tenantId\":\"<Environment-ID>\",\"token\":\"<API-Token>\"}"'@
    ParameterRequiredDescription
    Resource-GrouprequiredName of the resource group on which the VM is deployed.
    VMSS-NamerequiredName of the VMSS 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.
    serveroptionalThe server URL, if you want to configure an alternative communication endpoint as described in Prerequisites.
    enableLogAnalyticsoptionalSet to yes if you want to enable Log Monitoring.
    hostGroupoptionalDefine the host group to which the VM belongs.
  2. Update the VMSS virtual machines.

    bash
    az vmss update-instances --instance-ids '*' --resource-group $CLUSTER_RESOURCE_GROUP --name $SCALE_SET_NAME
  3. To check the deployment status, in your Dynatrace environment, go to Manage and select Deployment status.

    After installation is complete, restart your applications on the VMs. Immediately after restart, OneAgent will begin monitoring them.

  1. Run the command below to apply the extension to the VMSS definition.

    Note: Replace all values marked with <...> with your actual values.

    bash
    $vmss = Get-AzureRmVmss -ResourceGroupName "<Resource-Group>" -VMScaleSetName "<VMSS-Name>" Add-AzureRmVmssExtension -VirtualMachineScaleSet $vmss -Name dynatrace -Publisher dynatrace.ruxit -Type "<Extension-Type>" -Settings @{ "tenantId"="<Environment-ID>"; "token"="<API Token>";"server"="<Server-Url>"; "enableLogAnalytics"="yes"; "hostGroup"="<Host-Group>"; }
    ParameterRequiredDescription
    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.
    serveroptionalThe server URL, if you want to configure an alternative communication endpoint as described in Prerequisites.
    enableLogAnalyticsoptionalSet to yes if you want to enable Log Monitoring.
    hostGroupoptionalDefine the host group to which the VM belongs.
  2. Update the VMSS virtual machines with the new definition.

    bash
    Update-AzureRmVmss -VirtualMachineScaleSet $vmss -ResourceGroupName "<Resource-Group>" -Name "<VMSS-Name>"
    ParameterRequiredDescription
    Resource-GrouprequiredName of the resource group on which the VM is deployed.
    VMSS-NamerequiredName of the VMSS where you want to install the extension.
  3. To check the deployment status, in your Dynatrace environment, go to Manage and select Deployment status.

    After installation is complete, restart your applications on the VM. Immediately after restart, OneAgent will begin monitoring them.

Install Dynatrace OneAgent VM extension via an ARM template

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

  1. Place the JSON configuration for a virtual machine extension in the VMSS resource, under extensions in extensionProfile.

    Example:

    json
    { "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" } } } ] } } } }
  2. Configure the JSON file.

    json
    { "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>" }, } }
    ParameterRequiredDescription
    Resource-GrouprequiredName of the resource group on which the VM is deployed.
    VMSS-NamerequiredName of the VMSS 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.
    Extension-VersionoptionalRequired version1 of the extension.
    serveroptionalThe server URL, if you want to configure an alternative communication endpoint as described in Prerequisites.
    enableLogAnalyticsoptionalSet to yes if you want to enable Log Monitoring.
    hostGroupoptionalDefine the host group to which the VM belongs.
    1

    o fetch the list of extension versions, run

    plaintext
    az vm extension image list --name oneAgentLinux --publisher dynatrace.ruxit
  3. To check the deployment status, in your Dynatrace environment, go to Manage and select Deployment status.

    After installation is complete, restart your applications on the VM. Immediately after restart, OneAgent will begin monitoring them.

Troubleshooting

VMSS nodes not showing up in Dynatrace

Restart the VMSS nodes via PowerShell, replacing all values marked with <...> with your actual values:

bash
Restart-AzureRmVmss -ResourceGroupName "<Resource-Group>" -VMScaleSetName "<VMSS-Name>"
ParameterRequiredDescription
Resource-GrouprequiredName of the resource group on which the Virtual Machine is deployed
VMSS-NamerequiredName of the VMSS where you want to install the extension.
Related topics
  • Set up Dynatrace on Microsoft Azure

    Set up and configure monitoring for Microsoft Azure.

  • OneAgent platform and capability support matrix

    Learn which capabilities are supported by OneAgent on different operating systems and platforms.