Azure – You can now enable Azure Virtual Machine Insights with Azure Monitor (preview)

If you are running virtual machines in Azure, you are probably already aware that you can have insights about the performance of your virtual machines (see https://blog.hametbenoit.info/2019/07/19/azure-virtual-machines-insights-in-preview/).

Well, good new as now you also have the same by using Azure Monitor.

One of the advantage of it is you don’t need to have multiple virtual machine extensions (Log Analytics and Dependency Agent for the VM Insights, and Azure Monitor for Azure Monitor).

What’s new for Azure Monitor with VM Insights

  • Centralized configuration: easy VM Insights set up using data collection rules (DCR). If you are using Azure portal, VM insights creates a default DCR if one doesn’t already exist. You can associate the same DCR with multiple machines for the same set of configurations.
  • Optimize costs: configuration option to enable/disable collection of processes and dependencies data that provides Map view. Earlier, Dependency agent was required to enable VM insights to collect this data. However, with the new configuration options, you can opt out of Dependency agent installation.
  • Enhanced security and performance: Azure Monitor agent uses Managed Identity for virtual machines for authentication and security. These technologies are much more secure and “hack proof” than certificates or workspace keys that legacy agents use. This agent performs better at higher events-per-second upload rates compared to legacy agents.

Enabling VM Insights with Azure Monitor

Before you start looking at this you need to keep in mind the supportability matrix for the VM Insights as some OSes does not support yet the insights capabilities (see https://docs.microsoft.com/en-us/azure/azure-monitor/agents/agents-overview?tabs=PowerShellWindows#supported-operating-systems).

Well, how do you enable virtual machine Insights with Azure Monitor?

You can do it with either ARM Template, PowerShell or Azure Portal.

NOTE the virtual machines must be in running mode to be able to be configured.

Using the Azure portal

Connect to your Azure portal (https://portal.azure.com/) and search for Monitor to access the Azure Monitor capabilities and then access the Virtual Machines blade

image  image

From there you will be able to identify which virtual machines are enabled or not for monitoring and Insights and then manage the configuration of the Insights configuration

Because VM Insights uses a Log Analytics workspace (if none is existing a default one will be created), you need to configure the Log Analytics workspace to use for VM Insights by accessing the Overview\Other onboarding options tab to then configure the Log Analytics workspace

image

Then you can review which virtual machines are onboarded or not using with either the Monitored or Not Monitored tabs

image

You can then edit existing onboarded virtual machines to use a specific Log Analytics workspace and/or enable the Dependencies agent by clicking on the Enabled link (keep in mind the supportability matrix for Dependencies (see https://docs.microsoft.com/en-us/azure/azure-monitor/agents/agents-overview?tabs=PowerShellWindows#supported-operating-systems), as well as the Data Collection Rule (DCR) – you can create a new one from there too (MSVMI will be appended to the rule name you create).

image

When you access the Not Monitored tab you will then be able to enable VM Insights with Azure Monitor for the selected virtual machines; ensure you select Azure Monitor for enabling Insights

image  image  image

Once your virtual machines are onboarded, you can now view their performance and dependencies mapping using the Performance or Map tabs

image

Migrating VM Insights from Log Analytics agent

If you already have virtual machines configured to provide Insights using the Log Analytics agent, you can migrate then by accessing the Overview\Monitored tab to identify the ones using Log Analytics agent for Insights and then migrate them to use Azure Monitor agent instead by clicking on Configure using Azure Monitor Agent

image  image

Leave a Comment

Your email address will not be published. Required fields are marked *