Tutorial: Monitor a hybrid machine with Azure Monitor for VMs

Azure Monitor can collect data directly from your hybrid machines into a Log Analytics workspace for detailed analysis and correlation. Typically this would entail installing the Log Analytics agent on the machine using a script, manually, or automated method following your configuration management standards. Arc enabled servers recently introduced support to install the Log Analytics and Dependency agent VM extensions for Windows and Linux, enabling Azure Monitor to collect data from your non-Azure VMs.

This tutorial shows you how to configure and collect data from your Linux or Windows machines by enabling Azure Monitor for VMs following a simplified set of steps, which streamlines the experience and takes a shorter amount of time.

Prerequisites

  • If you don't have an Azure subscription, create a free account before you begin.

  • VM extension functionality is available only in the list of supported regions.

  • See Supported operating systems to ensure that the servers operating system you're enabling is supported by Azure Monitor for VMs.

  • Review firewall requirements for the Log Analytics agent provided in the Log Analytics agent overview. The Azure Monitor for VMs Map Dependency agent doesn't transmit any data itself, and it doesn't require any changes to firewalls or ports.

Sign in to Azure portal

Sign in to the Azure portal.

Enable Azure Monitor for VMs

  1. Launch the Azure Arc service in the Azure portal by clicking All services, then searching for and selecting Machines - Azure Arc.

    Search for Arc enabled servers in All Services

  2. On the Machines - Azure Arc page, select the connected machine you created in the quickstart article.

  3. From the left-pane under the Monitoring section, select Insights and then Enable.

    Select Insights option from left-hand menu

  4. On the Azure Monitor Insights Onboarding page, you are prompted to create a workspace. For this tutorial, we don't recommend you select an existing Log Analytics workspace if you have one already. Select the default, which is a workspace with a unique name in the same region as your registered connected machine. This workspace is created and configured for you.

    Enable Azure Monitor for VMs page

  5. You receive status messages while the configuration is performed. This process takes a few minutes as extensions are installed on your connected machine.

    Enable Azure Monitor for VMs progress status message

    When it's complete, you get a message that the machine has been successfully onboarded and the insight has been successfully deployed.

View data collected

After the deployment and configuration is completed, select Insights, and then select the Performance tab. On the Performance tab, it shows a select group of performance counters collected from the guest operating system of your machine. Scroll down to view more counters, and move the mouse over a graph to view average and percentiles taken starting from the time when the Log Analytics VM extension was installed on the machine.

Azure Monitor for VMs Performance charts for selected machine

Select Map to open the maps feature, which shows the processes running on the machine and their dependencies. Select Properties to open the property pane if it isn't already open.

Azure Monitor for VMs Map for selected machine

Expand the processes for your machine. Select one of the processes to view its details and to highlight its dependencies.

Select your machine again and then select Log Events. You see a list of tables that are stored in the Log Analytics workspace for the machine. This list will be different depending whether you're using a Windows or Linux machine. Select the Event table. The Event table includes all events from the Windows event log. Log Analytics opens with a simple query to retrieve collected event log entries.

Next steps

To learn more about Azure Monitor, look at the following article: