Azure VM Power State Metric Evaluation in DX APM
search cancel

Azure VM Power State Metric Evaluation in DX APM

book

Article ID: 442432

calendar_today

Updated On:

Products

DX Operational Observability DX SaaS

Issue/Introduction

You observe inconsistent values for the Azure VM Power State metric when monitoring with the DX APM Infrastructure Agent. Specifically, you see a value of 1 (Starting) even when no availability issues or restarts are reported in the Azure portal. Conversely, during a confirmed Windows Update restart, the metric remains at 2 (Running) instead of reflecting the state transition.

Environment

  • DX APM Infrastructure Agent
  • Microsoft Azure Environment

Cause

The Azure VM Power State metric in DX APM is evaluated based on the data retrieved via the Azure Monitor API. Discrepancies occur due to:

  • Polling Intervals: Brief state transitions (like a quick restart) may happen between polling cycles, causing the agent to miss the state change.
  • Metric Mapping: Values are mapped as follows:
    • 2: Running
    • 1: Starting
    • 0: Stopped/Deallocated
  • Platform Events: Platform-level events or host migrations in Azure can occasionally report a "Starting" state (value 1) to the API even if the application layer remains unaffected.

Resolution

You must verify the polling interval and correlation with Azure Monitor "Power Instance" metrics.

  1. Check Polling Frequency: You review the the Azure extension configuration to confirm the polling interval. If the interval is too long, you may miss rapid state changes.
  2. Correlate Metrics: You compare the DX APM Power State values against the Power Instance metric in Azure Monitor rather than the standard VM Availability metric, as they represent different data points.
  3. Adjust Alerting: To avoid noise from transient "Starting" states (value 1), you adjust your alert thresholds to require the state to persist for multiple periods before triggering.

Additional Information

Techdocs DX Agents Azure monitor