Monitor Resources with Azure Monitor
MS Learn module: Monitor your Azure virtual machines with Azure Monitor (
learn.azure.monitor-azure-vm-using-diagnostic-data) — the monitoring module of the AZ-104 path. Learning objectives: understand which monitoring data to collect from a VM; enable and view recommended alerts and diagnostics; use Azure Monitor to collect and analyze host metrics; use the Azure Monitor Agent to collect guest performance metrics and event logs; add VM Insights.
Overview (why this module matters)
This is the observability foundation of the path: it teaches you to collect telemetry — metrics, activity log, and logs — for each resource and route it to Azure Monitor. The pattern generalizes from VMs to any resource: enable diagnostics → data flows to metrics store + Log Analytics → analyze & alert.
Units / lessons covered
- Understand which monitoring data to collect from a VM (host vs guest).
- Enable and view recommended alerts and diagnostics.
- Collect and analyze VM host metrics (platform metrics, no agent needed).
- Use Azure Monitor Agent to collect guest performance metrics & event logs.
- Enable VM Insights (workbooks-based health) and route logs to a workspace.
Concepts introduced (link each term note)
- Azure Monitor — the umbrella platform collecting all telemetry.
- Metrics — numeric platform/host telemetry (no setup for host metrics).
- Activity log — control-plane/management audit events (separate from metrics/logs).
- Log Analytics workspace — the destination for guest logs & diagnostics.
- KQL — how you query logs in the workspace.
- Workbooks — interactive VM health views (VM Insights).
Key terms / commands
- Anomaly-gated “recommended alerts” appear automatically once VM Insights / diagnostics are on.
- Diagnostics settings (
az monitor diagnostic-settings create) route logs/metrics to LAW/storage/event hub. - Azure Monitor Agent (
az vm extension set --name AzureMonitorLinuxAgent | AzureMonitorWindowsAgent) collects guest telemetry into the LAW. - View metrics: Monitor → Metrics; query logs: Monitor → Logs (“ContainerLogs”/“Perf”/“VMComputer” style tables).
Hands-on / what to try
- Create a VM and open Metrics to see free host CPU/network/disk platform metrics (no agent).
- Create a diagnostic setting streaming guest metrics + logs to a Log Analytics workspace.
- Install the Azure Monitor Agent, enable VM Insights, and query agent data with KQL in the workspace.
Exam focus
- Host metrics = free/automatic; guest metrics/logs need the Azure Monitor Agent.
- Know the three sinks: Metrics, Activity Log (control plane), Log Analytics — and which data lands where.
- Diagnostic settings are the switch that makes logs measurable; without them Log Analytics stays empty.
- KQL basics (
where,project,summarize) are frequently tested.
Related
Path MOC · azure-monitor · azure-monitor-metrics · log-analytics · Next: alerts & action groups