Azure Monitor
Azure Monitor is Azure's unified platform for collecting, analyzing, and acting on metrics, logs, and traces. It powers Log Analytics, Application Insights, dashboards, and alert rules.
Azure Monitor
Azure Monitor collects two main kinds of data. Metrics are lightweight numeric time series, such as CPU percentage, kept for 93 days. Logs are richer records stored in a Log Analytics workspace and queried with KQL. Alert rules watch either kind and trigger action groups that send notifications or run automation.
What Is the Difference Between Azure Monitor, Log Analytics, and Application Insights?
Azure Monitor is the platform. Log Analytics is the log store and query engine inside it. Application Insights is the application performance monitoring feature, which writes request traces, dependency calls, and exceptions into a Log Analytics workspace, so one KQL query can join app and infrastructure data.
and apps"]:::cloud -->|emit data| M["Azure Monitor"]:::tool M -->|numbers| ME["Metrics"]:::app M -->|records| LA["Log Analytics"]:::app ME -->|rules| AL["Alerts and
action groups"]:::bad LA -->|rules| AL classDef cloud fill:#D1FAE5,color:#1E293B classDef tool fill:#326CE5,color:#FFFFFF classDef app fill:#EDE9FE,color:#1E293B classDef bad fill:#FFEDD5,color:#1E293B
How Do You Query a Metric From the CLI?
az monitor metrics list \ --resource /subscriptions/<sub-id>/resourceGroups/mumbai-prod-rg/providers/Microsoft.Compute/virtualMachines/encoder-node-01 \ --metric "Percentage CPU" --interval PT1M --aggregation AverageWhy It Matters in Production
An on-call team at a streaming company like Hotstar watches CPU, memory, and latency dashboards across encoding VMs during a live event, and alert rules page the engineer before viewers notice buffering.
Common MistakeCreating an alert and never testing its action group. If the email or webhook is misconfigured, the alert fires in the portal and nobody is notified.
RememberPlatform metrics are collected automatically, but guest-OS metrics and application telemetry need the Azure Monitor Agent or the Application Insights SDK.
Frequently Asked Questions
What does Azure Monitor collect without any setup?
Platform metrics and the Activity Log are collected automatically for every Azure resource. Resource logs, guest-OS data, and application telemetry need diagnostic settings, agents, or SDKs.
How can alerting get expensive?
Log search alerts at one-minute frequency across many resources add up, since rules are billed per evaluation and notifications may cost extra. Use metric alerts where possible and the longest frequency you can tolerate.
Where should logs be sent?
Send them to a Log Analytics workspace for querying and alerting, and optionally to a storage account for cheap long-term archive or an event hub to stream to external tools.