VM Insights

VM Insights

"VM Insights offers a streamlined approach to monitoring client workloads on virtual machines and virtual machine scale sets. It provides an inventory of your current VMs and guides you through enabling basic monitoring. Additionally, it tracks the performance of your virtual machines and scale sets by collecting data on running processes and their dependencies.

VM Insights supports monitoring for both Windows and Linux operating systems across:

  • Azure virtual machines.
  • Azure virtual machine scale sets.
  • Hybrid virtual machines integrated with Azure Arc.
  • On-premises virtual machines.
  • Virtual machines hosted in other cloud environments.

VM Insights: Overview
Pricing

"VM Insights itself is free of charge, but you will incur costs for its usage within the Log Analytics workspace. According to the pricing details on the Azure Monitor pricing page, VM Insights billing includes :

  • Data is ingested by agents and stored in the workspace.
  • Log-based alert rules.
  • Notifications triggered by alert rules.

Limitations

VM Insights gathers a specific set of metrics from the VM client but does not collect event data. If you need to collect events or additional performance counters, you can create data collection rules in the Azure portal using the same Azure Monitor agent employed by VM Insights.

Note: VM Insights does not support sending data to multiple Log Analytics workspaces (multi-homing).

Enabling VM Insights Overview

VM Insights to monitor the health and performance of:

  • Azure virtual machines.
  • Azure Virtual Machine Scale Sets.
  • Hybrid virtual machines connected with Azure Arc.
  • On-premises virtual machines.
  • Virtual machines hosted in another cloud environment.

Agents

When you enable VM Insights for a machine, the following agents are installed.

Azure Monitor Agent or Log Analytics Agent: Gathers data from the virtual machine or Virtual Machine Scale Set and sends it to the Log Analytics workspace.

Dependency Agent: Captures information about processes running on the virtual machine and their external dependencies, which are used by the Map feature in VM Insights. The Dependency Agent relies on the Azure Monitor Agent or Log Analytics Agent to transmit its data to Azure Monitor.

Enable VM Insights in the Azure Portal
A. View Monitored and Unmonitored Machines

To check which virtual machines in your directory are being monitored with VM Insights:

1. In the Portal, go to the Monitor menu and select Virtual Machines > Overview.

2. The Overview page will display all virtual machines and Virtual Machine Scale Sets in the chosen subscriptions.

3. Select the Monitored tab to view the list of machines with VM Insights enabled.

4. Select the Not Monitored tab to see the list of machines without VM Insights enabled.

The Not Monitored tab includes all machines without VM Insights enabled, even if they have the Azure Monitor Agent or Log Analytics Agent installed. If a virtual machine has the Log Analytics Agent but lacks the Dependency Agent, it will be listed as not monitored. In this scenario, the Azure Monitor Agent will be initiated without the option to use the Log Analytics Agent.

B. Enabling VM Insights for Azure Monitor Agent

To enable VM Insights on an unmonitored virtual machine or Virtual Machine Scale Set using the Azure Monitor Agent:

1. In the Azure portal, go to the Monitor menu and select Virtual Machines > Not Monitored.

2. Next to the machine you want to enable, click Enable. If the machine is not currently running, you'll need to start it before enabling VM Insights.

3. On the Insights Onboarding page, click Enable.

4. Then, on the Monitoring Configuration page, choose the Azure Monitor Agent and select a data collection rule from the dropdown menu."

5. The Data Collection Rule dropdown shows only the rules configured for VM Insights. If no rule has been set up for VM Insights yet, Azure Monitor will automatically create one with:

  • Guest performance enabled.
  • Processes and dependencies disabled.

6. To create a new data collection rule, select Create new. This allows you to choose a workspace and decide whether to collect processes and dependencies using the VM Insights Map feature.

7. Click Configure to begin the setup process. It may take a few minutes to install the agent and start data collection. You'll receive status updates during the configuration.

8. If you're using a manual upgrade model for your Virtual Machine Scale Set, you'll need to upgrade the instances to complete the setup. You can initiate the upgrades from the Instances page under the Settings section.

C. Enable VM Insights for Azure Monitor Agent on MAchine Monitored with Log Analytics Agent.

To add the Azure Monitor Agent to machines already using the Log Analytics Agent:

1. In the Azure portal, navigate to the Monitor menu and select Virtual Machines > Overview > Monitored.

2. Next to the machine you want to enable, click Configure using Azure Monitor Agent. If the machine is not currently running, you'll need to start it before enabling the agent.

3. On the Monitoring Configuration page, choose Azure Monitor Agent and select a rule from the Data Collection Rule dropdown menu.

4. The Data Collection Rule dropdown displays only rules configured for VM Insights. If no rule has been set up for VM Insights, Azure Monitor will automatically create one with:

  • Guest performance enabled.
  • Processes and dependencies enabled for compatibility with the Log Analytics Agent.

A. To create a new data collection rule, select Create new. This option allows you to choose a workspace and specify whether to collect processes and dependencies using the VM Insights Map feature.

B. With both agents installed, Azure Monitor will show a warning indicating that you might be collecting duplicate data.

5. After confirming that the Azure Monitor Agent is enabled, remove the Log Analytics Agent from the machine to avoid duplicate data collection.

Change Analysis in VM insights

Overview: If you have a VM that's running slowly and want to investigate whether recent configuration changes might be impacting its performance, you can use VM Insights to check the VM's performance. For instance, if you notice a spike in memory usage over the past hour, change analysis can help you identify if any configuration changes made around that time are responsible for the increase.

Enable Change Analysis

To onboard Change Analysis in VM Insights, you need to register the Microsoft.ChangeAnalysis resource provider. When you first activate VM Insights or Application Change Analysis in the Azure portal, this resource provider is automatically registered for you. Note that Application Change Analysis is a free service and does not introduce any performance overhead on your resources.

View Change Analysis

Change Analysis can be accessed from the Performance or Map tab in VM Insights by selecting the Change option.

Click Investigate Changes to open the Application Change Analysis page filtered for the VM. Review the listed changes to determine if any might have caused the issue. If you’re uncertain about a specific change, check the Changed by column to see who made the change.

Edit Workbooks Section

Workbooks have two modes: editing and reading. When you open a new workbook, it defaults to editing mode, which displays all the content, including hidden steps and parameters. Reading mode offers a simplified, report-style view that abstracts away the complexities of the report's creation. However, the underlying details remain accessible for modifications with just a few clicks.

  1. Once you finish editing a section, click Done Editing in the lower-left corner of the section.
  2. To duplicate a section, click the Clone this section icon. Duplicating sections is useful for iterating on a query while preserving previous versions.
  3. To reorder a section in the workbook, use the Move up or Move down icons.
  4. To permanently delete a section, click the Remove icon.

Add Query Section

To add a query section to your workbook, click Add query in the lower-left corner of the workbook or section.

Query sections are highly versatile and can help answer questions such as:

  • How did CPU utilization correlate with increased network traffic during a specific period?
  • What was the trend in available disk space over the past month?
  • How many network connection failures did my VM experience in the last two weeks?

You are not limited to querying data from just the VM that opened the workbook. To query across multiple VMs and Log Analytics workspaces, ensure you have the necessary access permissions.

To include data from other Log Analytics workspaces or a specific Application Insights app, use the workspace identifier. For more information on cross-resource queries, refer to the official guidance.

Add Metrics Section

Metrics sections allow you to integrate Azure Monitor metrics data into your interactive reports. While prebuilt workbooks in VM Insights usually feature analytic query data, you can create workbooks that include metric data, combining the strengths of both features in a single report. You can also pull metric data from resources across any subscriptions you have access to.

For example, you can pull VM data into a workbook to create a grid visualization of CPU performance.

Remove VM Insights Completely

If you still need the Log Analytics workspace but want to remove the VMInsights solution from it:

1. Sign in to the Azure portal.

2. Navigate to All Services. In the search box, type "Log Analytics," and select Log Analytics from the filtered suggestions.

3. In the list of Log Analytics workspaces, choose the workspace you selected when you enabled VM Insights.

4. On the left pane, click Legacy Solutions.

5. In the list of solutions, find and select VMInsights (workspace name). On the solution's Overview page, click Delete. When prompted to confirm, click Yes.

Disable the Monitoring and keep the workspace

1. Sign in to the Azure portal.

2. Go to Virtual Machines.

3. Select the VM from the list.

4. On the left pane, choose Extensions. On the Extensions page, select DependencyAgent.

5. On the extension properties page, click Uninstall.

6. Return to the Extensions page and select MicrosoftMonitoringAgent.On the extension properties page, click Uninstall.









要查看或添加评论,请登录

Ankit Ranjan (DevOps Engineer)的更多文章

  • What is Azure Pipelines?

    What is Azure Pipelines?

    Azure Pipelines Benefits of Azure Pipelines Azure Pipelines offers a fast, reliable, and secure way to automate the…

  • Installing Docker on Windows 11 using WSL 2: A Step-by-Step Guide

    Installing Docker on Windows 11 using WSL 2: A Step-by-Step Guide

    Docker has become a crucial tool for developers, enabling seamless and portable application deployment. Prerequisites…

  • Safeguard Your Azure Route Server with Azure DDoS Protection

    Safeguard Your Azure Route Server with Azure DDoS Protection

    This guide walks you through securing your Azure Route Server by integrating it with Azure DDoS Protection in a virtual…

  • Protect your public load balancer with Azure DDoS Protection

    Protect your public load balancer with Azure DDoS Protection

    Azure DDoS Protection provides advanced mitigation features like adaptive tuning, attack alert notifications, and…

  • Create a public load balancer with an IP-based backend

    Create a public load balancer with an IP-based backend

    This Edition will teach us how to create a public load balancer with an IP-based backend pool. Traditionally, an Azure…

  • Load Balancer and its Different Types

    Load Balancer and its Different Types

    Global Load Balancer The Azure Standard Load Balancer enables cross-region load balancing, providing geo-redundant high…

  • Inbound NAT Rule

    Inbound NAT Rule

    Inbound NAT rules enable connections to virtual machines (VMs) in an Azure virtual network using a public IP address…

  • Azure Availability Set

    Azure Availability Set

    As part of a high-availability deployment, virtual machines are typically organized into multiple availability sets to…

    8 条评论
  • Azure Load Balancer (Part 2)

    Azure Load Balancer (Part 2)

    What is Azure Front Door Azure Front Door helps you deliver content, files, apps, and APIs with better availability…

  • Azure Load Balancer (Part-1)

    Azure Load Balancer (Part-1)

    Load balancing involves the efficient distribution of incoming network traffic across multiple backend servers or…

社区洞察

其他会员也浏览了