Monitor Azure virtual servers via VM extension

Add a monitor via VM extension in Azure and view all your critical metrics in the Site24x7 dashboard. Azure users can now add a Windows or a Linux monitor in a more simplified way without the need to download the agent.

You can add a server monitor via VM extension using one of the three ways:

Add a VM extension using the Azure UI portal:

  1. Login to Azure portal
  2. If you are creating a new VM, navigate to New > Virtual Machines > select any of the Windows/Linux Server apps listed for adding a Windows/Linux monitor

    You can also add a new VM by navigating to Resource Groups > Add (+) > Select any of the Windows Server apps listed
  3. In case you already have an existing VM in Azure, navigate to Virtual Machines > select the VM to which you want to add the extension
  4. Choose deployment model (Classic/Resource) > click Create
  5. Configure basic settings, size of the VM, and other optional features
  6. Under Settings blade, go to Extensions > Add Extension (+) > Server Monitoring for Windows/Linux - Site24x7

  7. To authenticate the Windows/Linux agent, a device key is required. Login to Site24x7 and navigate to Admin > Developer > Device Key in your Site24x7 client. Sign Up if you are a new user.
  8. Click Create
  9. Enter the obtained device key in the field provided. Click OK
  10. You can now view your monitor in the Site24x7 dashboard and start monitoring your critical metrics

Add a VM extension via PowerShell:


Make sure the Azure PowerShell SDK is installed and supported from version 2.6 and above

Using Classic model:

  1. Login to Microsoft Azure portal by entering the command
  2. After logging in, execute the command
    For Linux server,
    Set-AzVMExtension -SettingString '{"site24x7LicenseKey":"Your Device Key from Site24x7 portal"}'
    -Publisher Site24x7 -ExtensionType Site24x7LinuxServerExtn
    -Version 1.8 -Name "Site24x7LinuxServerExtn"
    -ResourceGroupName "Your resource group's name"
    -Location "Your VM's location" -VMName "Your VM Name"
    For Windows server,
    Set-AzVMExtension -ResourceGroupName "Your Resource Group's Name"
    -Location "Your VM Location" -VMName "Your VM Name"
    -Name "Site24x7WindowsServerExtn" -Publisher "Site24x7" -ExtensionType "Site24x7WindowsServerExtn"
    -TypeHandlerVersion "1.8"
    -SettingString '{"site24x7AgentType":"azurevmextnwindowsserver" , "site24x7LicenseKey":"SITE24x7 Device Key"}'

Using Azure Resource Manager (ARM):

Please follow the below steps to add a VM extension via PowerShell using ARM:

  1. Log in to Microsoft Azure portal by entering the command
  2. After logging in, execute the command
    For Linux server,
    Set-AzureRmVMExtension -ProtectedSettingString '{"site24x7LicenseKey":"enter your licensekey"}' -Publisher Site24x7
    -ExtensionType Site24x7LinuxServerExtn -Version 1.5  -Name <Any extension name> -ResourceGroupName <resourcegroup name> -Location <location> -VMName <vm name>
    For Windows server,
    Set-AzureRmVMExtension -ProtectedSettingString '{"site24x7AgentType":"azurevmextnwindowsserver" , "site24x7LicenseKey":"enter your licensekey"}' -Publisher Site24x7 -ExtensionType Site24x7WindowsServerExtn -Version 1.5 -Name <Any extension name> -ResourceGroupName <resourcegroup name> -Location <location> -VMName <vm name>
  • "site24x7LicenseKey" is the Device key that can be obtained from Admin > Developer > Device Key
  • The SettingString, Publisher, ExtensionType and the Version in the command string should not be changed
  • The user can modify -Name that will be visible in the Extension portal (Settings > Extensions)

For both Classic and ARM models,

Get version and other properties of the extension by executing the following commands:

Get-AzureVMAvailableExtension -ExtensionName Site24x7LinuxServerExtn
Get-AzureVMAvailableExtension -ExtensionName Site24x7WindowsServerExtn

Get the list of locations:


Remove an extension:

For Linux server,

Remove-AzureRmVMExtension -VMName <vm name> -Name Site24x7LinuxServerExtn
-ResourceGroupName <resourcegroup name>

For Windows server,

Remove-AzureRmVMExtension -VMName <vm name> -Name Site24x7WindowsServerExtn -ResourceGroupName <resourcegroup name>

Adding a VM extension via Azure CLI (Command Line Interface):

[Available only for Linux platform]

  1. For Azure CLI version 1.0, login to Microsoft Azure portal and execute the following command:
    azure login
    azure vm extension set -g <resource-group-name> --vm-name <vm-name> --version 1.5 --publisher-name Site24x7 -n Site24x7LinuxServerExtn --private-config "{\"site24x7LicenseKey\":\"ab_9868f27c8a45b2fc76088c8ecec7bd7305f59661\"}" --public-config "{\"site24x7AgentType\":\"azurevmextnlinuxserver\"}"
  2. For Azure CLI version 2.0, use the following commands to login and install the vm extension:
    az login
    az vm extension set --publisher Site24x7 -n Site24x7LinuxServerExtn -g <resource-group-name> --vm-name <vm-name> --version 1.5 --protected-settings "{\"site24x7LicenseKey\":\"ab_9868f27c8a45b2fc76088c8ecec7bd7305f59661\"}" --settings "{\"site24x7AgentType\":\"azurevmextnlinuxserver\"}"
You can also associate configuration profiles while adding a VM extension via Azure CLI. Learn more.
Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.