Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Virtual machines in Azure automatically send host-level metrics to Azure Monitor, which provide insights into the overall performance and health of the virtual machine. For complete monitoring though, you also need to collect guest-level performance data from the virtual machine, which provides insights into the applications, components, and processes running on the machine and their performance and health.
Note
- To enable monitoring using command line tools such as CLI and PowerShell, see Enable VM monitoring in Azure Monitor.
- For virtual machine scale sets, see Tutorial: Enable monitoring for an Azure virtual machine scale set.
In this tutorial, you learn how to:
- Enable enhanced monitoring for a virtual machine, which installs Azure Monitor Agent and begins data collection.
- Choose between metrics-based (preview) and logs-based (classic) experiences.
- Inspect graphs analyzing performance data collected from the virtual machine.
Prerequisites
To complete this tutorial, you need an Azure virtual machine to monitor.
Note
As part of the Azure Monitor Agent installation process, Azure assigns a system-assigned managed identity to the machine if such an identity doesn't already exist.
Enable enhanced monitoring
Select Monitor from your virtual machine's menu in the Azure portal. This shows common monitoring data collected for the machine. Host metrics showing CPU, network, and disk utilization are available by default. If enhanced monitoring hasn't been enabled, then several of the performance charts show no data, and you'll receive a message offering to enable it. Click Configure to open the Configure monitor page.
Leave [Preview] OpenTelemetry metrics selected since this experience is available at no cost. You can choose to also select the logs-based option so you can compare the different experience between the two. For a complete description of the differences between these two experiences, see Compare metrics-based and logs-based experiences.
A default Azure Monitor workspace and Log Analytics workspace are selected for you. If they don't already exist, then they'll be created for you in the same region as the virtual machine. If you already have existing workspaces that you want to use, then select Customize infrastructure monitoring and select the workspaces you want to use.
Note
Metrics collected for metrics-based experience (preview) are listed in the Customize configuration page for information purposes only. This list can't be modified from this screen.
Select Review + Enable and then Enable After a few minutes, the Azure Monitor agent is installed on the virtual machine, and data will start being collected.
View performance data
It will take a few minutes after the agent is installed for enough data to be collected to populate the portal. When both experiences are enabled for a VM, you get a selector at the top to choose the experience you want to view. Select each experience to compare the different charts and insights that are available.
The metrics-based (preview) experience provides a set of charts focused on key performance indicators for the virtual machine. It also incorporates status from Service Health and Resource Health to give you a quick view of the machine's overall health.
The logs-based experience uses summarized performance data collected in the Log Analytics workspace to populate a set of charts that allow you to analyze the performance of different components of the machine such as CPU, disk, and network over time.
Note
The Maps feature is displayed in both experiences but has been deprecated as described in VM Insights Map and Dependency Agent retirement guidance.
View multi-VM performance data
The logs-based experience also provides the ability to view performance data across multiple virtual machines in a single chart. This allows you to compare the performance of different machines and identify any that might be under heavy load or experiencing performance issues.
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.
Next steps
Now that you have enabled enhanced monitoring for your virtual machine, collect guest logs such as Windows event logs or Syslog from the virtual machine.