Installing Dynatrace on Azure Virtual Machines: Step-by-Step Guide for Seamless Monitoring

Abhi NikamAbhi Nikam
3 min read

Introduction

For developers and IT professionals, monitoring application performance is a critical task to ensure a seamless user experience. Dynatrace, with its advanced monitoring capabilities, enables you to track infrastructure health, detect anomalies, and optimize application performance effortlessly.

This guide will take you through the process of setting up an Azure Virtual Machine (VM), securely connecting to it using SSH with PuTTY, and installing Dynatrace’s OneAgent to begin monitoring. By the end, your environment will be up and running, ready to provide real-time performance insights.

Step 1: Create an Azure Virtual Machine

Setting up the VM is the first step to getting started. Follow these steps:

  1. Log in to Azure Portal:

    • Go to the Azure Portal and sign in with your credentials.
  2. Navigate to Virtual Machines:

    • Click Create a resource > Compute > Virtual Machine.

    • Fill in the Basic Settings:

      • Subscription: Select your subscription.

      • Resource Group: Create a new group or use an existing one.

      • VM Name: Enter a descriptive name (e.g., DemoDynatraceVM).

      • Region: Choose a location close to you.

      • Availability Zone: Opt for "Zone 1" if available.

      • Security Type: Set it as "Standard."

  3. Choose the Image:

    • Select Ubuntu Server 20.04 LTS (recommended for Dynatrace).
  4. Authentication and Networking:

    • Authentication Type: Choose SSH Public Key.

    • Username: Create a user (e.g., AbhishekNikamUser).

    • SSH Key: Generate a new key pair in Azure or upload your own. Download the .pem file for later use.

    • Enable SSH (Port 22) in the Inbound Port Rules to allow remote access.

  5. Create the VM:

    • Click Review + Create, validate your settings, and select Create.

Step 2: Connect to the VM

Use Secure Shell (SSH) to connect to your Linux VM. Replace [username] and [IPaddress] with your actual credentials:

bash

ssh [username]@[IPaddress]

Step 3: Download Dynatrace OneAgent Installer

You can download the installer in two ways:

Option 1: Use API Token for Direct Download

bash

wget -O Dynatrace-OneAgent-Linux-x86-1.309.66.20250401-150134.sh "https://lhy33360.live.dynatrace.com/api/v1/deployment/installer/agent/unix/default/latest?arch=x86" --header="Authorization: Api-Token <API-TOKEN>"

Replace <API-TOKEN> with your Dynatrace API token.

(Just click on the generate token , it will generate a token which will be unique and useful for download oneagent)

Option 2: Verify Installer Signature

Verify the installer to ensure its authenticity:

bash

wget https://ca.dynatrace.com/dt-root.cert.pem
( echo 'Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="sha-256"; boundary="--SIGNED-INSTALLER"'; echo ; echo ; echo '----SIGNED-INSTALLER' ; cat Dynatrace-OneAgent-Linux-x86-1.309.66.20250401-150134.sh ) | openssl cms -verify -CAfile dt-root.cert.pem > /dev/null

Step 4: Install Dynatrace OneAgent

Install the OneAgent using the privileged user account. Specify monitoring mode and enable application log content access:

bash

/bin/sh Dynatrace-OneAgent-Linux-x86-1.309.66.20250401-150134.sh --set-monitoring-mode=fullstack --set-app-log-content-access=true

Step 4: Verify VM Integration with Dynatrace

Ensure your VM is successfully integrated with Dynatrace:

  1. Check Infrastructure in Dynatrace:

    • In Dynatrace, go to Infrastructure > Hosts.

    • You should see your VM listed as a monitored host.

  2. Analyze Metrics:

    • Click on the host to view detailed metrics such as CPU usage, memory consumption, and network activity.

0
Subscribe to my newsletter

Read articles from Abhi Nikam directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Abhi Nikam
Abhi Nikam