• 3 min read

Azure Linux VM Infrastructure Monitoring and Diagnostics

In this post, we will discuss details on new monitoring capabilities we recently released (currently in Preview) for Linux virtual machines running on Azure.

A significant number of Virtual Machines on Azure today are running Linux workloads. In my post from September, I shared details on how to setup, configure and read metrics to monitor and diagnose Windows VMs running on Azure. In this post, I would like to provide details on new monitoring capabilities we have just released (currently in Preview) for Linux virtual machines running on Azure.

Recently we published a monitoring agent that is enabled for Linux VMs running on Azure when the user enables monitoring and diagnostics and takes advantage of the same Azure extension technology that is supported on Azure VMs. For details, reference: Azure VM Extensions and Features. To enable monitoring and diagnostics for Azure Linux VMs, you enable and install monitoring agent through the portal UI by turning on Diagnostics, Azure CLI, PowerShell or through the Azure SDKs. For details and documentation, reference – Using Linux Diagnostic Extension to Monitor Linux VM’s performance and diagnostic data.

In order to enable monitoring on an Azure VM, just make sure that the monitoring Agent is enabled as follows:


Using The Portal:

Select Monitoring/Diagnostics ON as shown below – this step will install the monitoring agent required to start collecting diagnostics information for the virtual machine.



Azure CLI Sample:

# azure vm extension set myvm LinuxDiagnostic Microsoft.OSTCExtensions 2.0 --private-config-path PrivateConfig.json

PowerShell Sample:

Set-AzureVMExtension -ExtensionName “LinuxDiagnostic” -VM $vm -Publisher “Microsoft.OSTCExtensions” -Version 2.0 -PrivateConfiguration “PrivateConfig.json” | Update-AzureVM


You can change from version 2.0 to a later version when available. For details about setting up the monitoring configurations and some samples, visit the document – Using Linux Diagnostic Extension to Monitor Linux VM’s performance and diagnostic data.

Using Azure SDK:

Reference the following SDK documentation – Microsoft Azure Monitoring Services Management Library.

Once Diagnostics is enabled in the Linux VM, it will collect various metrics that can later be retrieved either from the Portal or other client tools mentioned above. Although the list of metrics collected can grow or change in future to support additional ones as well as workload specific metrics, we currently support the following metrics:

  • CPU DPC time
  • CPU IO wait time
  • CPU idle time
  • CPU interrupt time
  • CPU nice time
  • CPU percentage
  • CPU percentage guest OS
  • CPU privileged time
  • CPU user time
  • Disk queue length
  • Disk read
  • Disk read guest OS
  • Disk read time
  • Disk reads
  • Disk total bytes
  • Disk transfer time
  • Disk transfers
  • Disk write
  • Disk write guest OS
  • Disk write time
  • Disk writes
  • Mem. percent available
  • Mem. used by cache
  • Memory available
  • Memory percentage
  • Memory used
  • Network In
  • Network Out
  • Network collisions
  • Network in guest OS
  • Network out guest OS
  • Network total bytes
  • Packets received
  • Packets received errors
  • Packets sent
  • Packets sent errors
  • Page reads
  • Page writes
  • Pages
  • Swap available
  • Swap percent available
  • Swap percent used
  • Swap used


In order to view and analyze these metrics and related KPIs- Key Performance Indicators from the portal, you can use the same mechanisms to view other data about your deployed VMs on Azure – see menu item below:

2015-05-31_11h22_30 2015-05-31_11h17_04


Thus far we covered details on how to take advantage of Azure monitoring agent to enable, configure, and read monitoring and diagnostics data from Azure Linux VMs. For Windows VMs, reference details in this blog.


In this blog, I have summarized the options available to help you monitor your deployed Linux VMs on Azure. We described the options that are available out of the box when you deploy an Azure Linux VM through the new Azure Linux Agent – currently in preview, so your feedback will be greatly appreciated too.  I hope this will give you enough flexibility to help you monitor and diagnose any of your running Azure VMs whether Linux or Windows virtual machines running on Azure IaaS.


Additional References


Contributors: Ning Kuang, Stephen Siciliano, Thomas Pham, and Khalid Mouss