Edit

Share via


Tutorial: Enable monitoring with VM insights for an Azure virtual machine

VM insights is a feature of Azure Monitor that quickly gets you started monitoring your virtual machines. VM insights installs Azure Monitor agent, which is required to collect the guest operating system and prepares you to configure more monitoring from your VMs according to your requirements.

In this tutorial, you learn how to:

  • Enable VM insights for a virtual machine, which installs Azure Monitor Agent and begins data collection.
  • Understand the differences between OpenTelemetry-based metrics and Log Analytics workspace-based metrics.
  • Inspect graphs analyzing performance data collected from the virtual machine.

Prerequisites

To complete this tutorial, you need an Azure virtual machine to monitor.

Enable VM insights

Select Insights from your virtual machine's menu in the Azure portal. If VM insights isn't enabled, you see a short description of it and an option to enable it. Select Enable to open the Monitoring configuration pane. Leave the default option of Azure Monitor agent.

To reduce cost for data collection, VM insights creates a default data collection rule that doesn't include collection of processes and dependencies. To enable this collection, select Create New to create a new data collection rule.

Screenshot that shows enabling VM insights with workspace.

Provide a Data collection rule name and then select Enable processes and dependencies (Map). You can't disable collection of guest performance because it's required for VM insights.

Keep the default Log Analytics workspace for the subscription unless you have another workspace that you want to use. Select Create to create the new data collection rule. Select Configure to start VM insights configuration.

Screenshot that shows configuring a new data collection rule.

A message says that monitoring is being enabled. It might take several minutes for the agent to be installed and for data collection to begin.

View performance

When the deployment is finished, you see views on the Performance tab in VM insights with performance data for the machine. This data shows you the values of key guest metrics over time.

Screenshot that shows the VM insights Performance view.

View processes and dependencies

Select the Map tab to view processes and dependencies for the virtual machine. The current machine is at the center of the view. View the processes running on it by expanding Processes.

Screenshot that shows the VM insights Map view with processes.

View machine details

The Map view provides different tabs with information collected about the virtual machine. Select the tabs to see what's available.

Screenshot that shows the VM insights Map view with machine details.

Next steps

VM insights collects performance data from the VM guest operating system, but it doesn't collect log data such as Windows event log or Syslog. Now that you have the machine monitored with Azure Monitor Agent, you can create another data collection rule to perform this collection.