Azure Monitor - Metrics Namespace - Virtual Machine Guest Not coming up

Gladson Oliver 5 Reputation points
2024-10-25T07:40:36.9133333+00:00

Hi Folks,

I am trying to enable Guest OS Metrics for Azure VM (Win 2019/2022/2016). I followed below document to enable DCR/Log Analytics for enabling Virtual Machine Guest in Metrics Namespace but unfortunately it is not coming up.

https://learn.microsoft.com/en-us/azure/azure-monitor/vm/tutorial-monitor-vm-guest

Did little R&D and than I enabled diagnostic setting of Azure VM in storage account which only enable Guest Metrics but again it was classic and the alerts for the same is not supported. Further to enable Virtual Machine Guest I enable Sinks agent in Azure Diagnostics but the same is in preview hence i am not in favor for using it in production.

My question is as below -

  1. What is the right way to have Virtual Machine Guest enabled for metrics namespace & alerting's for the same.
  2. Do we have any proper links for such scenario for enabling of Virtual Machine Guest enablement.

User's image

User's image

Looking for urgent positive answer.

Regards

Gladson

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,341 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Vinodh247 24,486 Reputation points MVP
    2024-10-27T10:42:30.4566667+00:00

    Hi Gladson Oliver,

    Thanks for reaching out to Microsoft Q&A.

    To enable Virtual Machine Guest metrics for your Azure VMs and ensure you can monitor and alert based on these metrics, here’s a structured approach:

    1. Verify Diagnostic Settings and Data Collection Rules
    2. Diagnostic Settings: Ensure that the diagnostic settings are configured correctly to send guest metrics. However, since the traditional (classic) guest metrics do not support alerting and are somewhat limited, you'll want to use a modern setup.
    3. Data Collection Rules (DCR): If you're using Azure Monitor, setting up DCRs can be an effective way to gather guest OS metrics. Ensure that the DCR is targeting the correct VMs and that it includes the necessary performance counters (like CPU, memory, disk, etc.).
    4. Enable Azure Monitor Agent (AMA) for Guest Metrics (Preferred)
    • The Azure Monitor Agent (AMA) is the recommended method for collecting guest OS metrics instead of relying on the legacy guest metrics (classic). AMA is actively developed and supports newer metric namespaces and better integration with Log Analytics.
    • To set this up:
      • Install the AMA on your VMs.
        • Use the DCR to collect guest metrics by selecting Metrics Namespace: Virtual Machine Guest in the Azure Monitor Metrics.
          • AMA also supports Azure Monitor alerts, which should meet your requirements for alerting in a production environment.
    1. Avoid Sinks in Production
    • As you noted, using Sinks under diagnostic settings is in preview and not ideal for production environments. While it enables some guest metrics, the AMA and DCR approach provide a more stable, supported method.
    1. Creating Alerts
    • Once the guest metrics are flowing into Azure Monitor (via AMA and DCR), you can set up alerts based on these metrics. Go to Azure Monitor > Alerts and create new alert rules based on the guest metrics available in the Virtual Machine Guest namespace.

    Useful Links and Documentation

    By using AMA along with DCR, you should be able to reliably capture guest OS metrics and set up alerting, suitable for a production setup.

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.