Understanding Azure Monitor
This lesson explains data types, collection and alerting in Azure Monitor.
Learning outcomes
After completing this lesson, you will be able to:
- Describe metrics, logs, traces and changes.
- Identify how each source is collected.
- Distinguish the types of alert.
- Describe action groups and alert processing rules.
What Azure Monitor collects
Azure Monitor gathers telemetry from Azure resources, applications and hybrid machines. Its data falls into a few types, and each one answers a different question.
Metrics
Metrics are numbers recorded over time, such as CPU percentage. They are light and fast, so they suit dashboards and near-real-time alerts. Platform metrics are collected automatically for most resources, with no setup.
Logs
Logs are records with many fields, such as a request with its URL, duration and result. They are stored in a Log Analytics workspace, and queried with Kusto Query Language (KQL). They suit investigation and correlation.
Traces
Distributed traces follow a request across services, and are explained in a later lesson.
Changes
Change data records what changed on resources, which helps when a problem begins shortly after a change.
The following diagram checks each Azure Monitor data source against the question of who deleted a storage account.

Metric, log or trace?
How data arrives
Different sources need different collection. The following table shows the main ones. Note that some collection is automatic, and some requires configuration, which is a common exam distinction.
| Source | Examples | How it is collected |
|---|---|---|
| Azure platform | Host CPU, storage transactions | Automatic metrics |
| Control plane | Who stopped a virtual machine | Automatic activity log, kept for 90 days |
| Inside a resource | Key Vault reads, SQL audit | Resource logs, through a diagnostic setting |
| Guest operating system | Memory, disk, syslog | Azure Monitor Agent with a data collection rule |
| Application | Requests, exceptions | Application Insights |
| Kubernetes | Pods, nodes | Container insights and Managed Prometheus |
A diagnostic setting routes resource logs and metrics to a workspace, a storage account, an event hub or a partner solution. A data collection rule tells the Azure Monitor Agent what to gather, and where to send it. The older Log Analytics agent was retired in August 2024, and must not be selected for new work.
Automatic or configured?
Alerts and actions
An alert rule watches for a condition, and it fires when the condition is met. There are three main types. A metric alert suits a numeric threshold, and it evaluates quickly. A log search alert runs a KQL query on a schedule, which suits complex conditions. An activity log alert reacts to control plane or Service Health events.
An action group is a reusable list of notifications and actions, such as email, an SMS message, a webhook, an Azure Function or a logic app. Alert processing rules can suppress notifications during planned maintenance, without changing alert rules. A deployment pipeline can apply such a rule during a release, to avoid false alarms.
Alert rules and action groups
Presenting data
Azure Monitor workbooks combine text, queries and charts into interactive reports. Azure dashboards pin charts in a shared view. Azure Managed Grafana and Azure Monitor dashboards with Grafana suit teams that use Grafana, and Power BI suits business reporting. Insights are prebuilt views for specific services, such as VM insights, which the next lesson describes.
Ways to present monitoring data
Finding the right data
Someone deleted a storage account last week, and a team must discover who did it. No monitoring was configured. Where can they look?
The activity log records control plane operations automatically, for 90 days, so it shows who deleted the account. Resource logs need a diagnostic setting, which did not exist. Metrics hold numbers and not callers. Application Insights tracks application telemetry, and it has no record of management operations.
Which alert type suits a complex condition that spans several tables?
Show answer
A log search alert, which runs a KQL query on a schedule.
Exam Tips
Remember for the exam
- Metrics are numbers over time; logs are detailed records queried with KQL.
- The activity log is automatic, and kept for 90 days.
- Resource logs need a diagnostic setting.
- Guest data needs the Azure Monitor Agent and a data collection rule.
- Action groups define notifications and actions; alert processing rules suppress them.