Alert Rules, Action Groups and Alert Processing Rules
30-second answer
An alert rule watches a signal (a metric, a log search query, the activity log or Service and Resource Health) on a scope and fires when its condition is true, with a severity from Sev0 to Sev4. When it fires, it calls one or more action groups: reusable lists of notifications (email, SMS, push, voice, email to an Azure Resource Manager role) and actions (webhook, Logic App, Azure Function, Automation runbook, Event Hubs, ITSM). An alert processing rule acts on alerts that already fired: it can suppress notifications (for example during a recurring maintenance window) or add action groups to every alert in a scope.
Simulate it » No Azure account neededExam objective: 5.1.4 Set up alert rules, action groups, and alert processing rules in Azure Monitor. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
In <strong>Monitor → Alerts</strong> you see fired alerts by severity and their state (New, Acknowledged, Closed). Start with who gets told: <strong>Action groups</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- In Monitor → Alerts you see fired alerts by severity and their state (New, Acknowledged, Closed). Start with who gets told: Action groups.
- Name it and give it a short display name (12 characters at most). Action groups are global and reusable across many alert rules.
- On Notifications, add an email and an SMS to the on-call phone. SMS is rate limited to about one every 5 minutes per number.
- On Actions, a webhook opens a ticket automatically. Review and create.
- Now the rule. Scope is vm-app01. On Condition: Average Percentage CPU greater than 80, checked every minute over a 5-minute lookback.
- On Actions you selected ag-ops. On Details, set Severity 2 and the name. A metric alert resolves itself when CPU drops back.
- Saturday patching reboots every VM and pages everyone. An alert processing rule with Suppress notifications fixes that.
- Make it Recurring, weekly on Saturday. Alerts still fire and show in Alerts during the window; only the notifications are removed.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Alert rule fires into an action group
An alert rule watches a signal (a metric, a log query, the activity log) and fires when the condition holds. It hands the alert to an action group: email, SMS, push, voice, a webhook, a Logic App, a Function or an ITSM ticket.
🤔 What happens if…
Read this tour as text
- Platform metrics arrive on their own. Every Azure resource sends platform metrics (Percentage CPU, Transactions, Availability) to Azure Monitor about once a minute, with no agent and no setting. Metrics explorer charts them. Azure keeps them for 93 days.
- Resource logs need a diagnostic setting. Resource logs (StorageRead, AuditEvent, NSG events) are thrown away until a diagnostic setting routes them to a Log Analytics workspace, a storage account or Event Hubs. The activity log records who changed what in the subscription and keeps it 90 days.
- Ask the workspace with KQL. Logs land in tables in the workspace: AzureDiagnostics, StorageBlobLogs, AzureActivity, InsightsMetrics. KQL reads top to bottom through pipes:
wherefilters,summarize count() by bin(TimeGenerated, 5m)groups,render timechartdraws. - Alert rule fires into an action group. An alert rule watches a signal (a metric, a log query, the activity log) and fires when the condition holds. It hands the alert to an action group: email, SMS, push, voice, a webhook, a Logic App, a Function or an ITSM ticket.
- Alert processing rules. An alert processing rule acts on alerts that already fired. Suppress notifications during a maintenance window, or apply an action group to every alert in a scope. The alert still shows in Alerts; only the notifications change.
- Insights and Connection monitor. VM insights collects performance and a connection map through the Azure Monitor Agent and a data collection rule. Network Watcher Connection monitor runs TCP, HTTP or ICMP tests from an agent on the source VM and records failures and round-trip time.
- Back up to a vault on a schedule. A Recovery Services vault in the same region as the VM backs it up on a backup policy: when to run, how long to keep instant-restore snapshots and daily, weekly, monthly and yearly points. A Backup vault protects blobs, disks, PostgreSQL flexible servers and AKS.
- Restore, and soft delete. Restore files by mounting a recovery point, create a new VM, restore disks, or replace existing disks. Soft delete keeps deleted backup data for 14 days at no cost, so a mistake or an attacker can be undone.
- Site Recovery: replicate and fail over. Azure Site Recovery replicates a VM’s disks to another region, into a Recovery Services vault in the target region. A test failover builds a copy in an isolated network. A real failover is followed by commit and re-protect.
The on-call team wants a text when the app VM runs hot, but not at 23:00 on a Saturday when patching reboots everything. Wire an alert to an action group, mute it with a processing rule, turn on VM insights and watch the app-to-SQL path with Connection monitor until someone breaks it.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
The on-call phone buzzes 40 times every Saturday night during patching.
😊 THE SOLUTION
Alert through action groups, and suppress them in the maintenance window.
- Nobody notices high CPU✓ A metric alert rule
- Same contacts in 30 rules✓ One reusable action group
- Pages during planned reboots✓ A recurring suppression rule
Start with a question
Your house has a smoke alarm. Who should it ring, and should it ring while you're making toast?
The smoke detector decides there’s a problem. That’s the alert rule. What happens next is a separate choice: beep in the hall, text your phone, call the neighbour. That list is the action group, and every detector in the house can share it.
And when you know you’re about to burn the toast, you press the hush button for ten minutes. The detector still notices the smoke, it just doesn’t call anyone. That’s an alert processing rule.
Explain it like I’m 10
The technical explanation
Azure Monitor alerts have three building blocks. Keeping them separate is the whole trick.
-
1 Alert rule
Average Percentage CPU on vm-app01 > 80% over 5 minutes, checked every minute. Severity 2.
-
2 Alert
The condition holds, so an alert is created in state Fired / New.
-
3 Processing rule
Is any rule active for this scope right now? Suppress, or add another action group.
-
4 Action group
Email ops, SMS the on-call phone, call the ITSM webhook.
Alert rule types
| Type | Signal | Evaluated | Use it for |
|---|---|---|---|
| Metric | Platform or custom metric | Every 1 to 15 minutes over a lookback (window) | CPU, memory, disk, availability, queue length. Static or dynamic thresholds. One rule can watch many VMs in a resource group |
| Log search | A KQL query on a workspace | On a schedule (1 minute to 24 hours) | Event IDs, failed sign-ins, patterns across tables |
| Activity log | Activity log events | When the event arrives | “Someone deleted a VM”, policy events, Service Health (Azure incident in your region) and Resource Health (your VM became unavailable) |
| Smart detection, Prometheus | Application Insights, managed Prometheus | Varies | App anomalies, Kubernetes metrics |
Every rule has a scope (a resource, resource group or subscription), a condition, action groups, and details: name, severity (Sev0 critical to Sev4 verbose), and whether it automatically resolves. Metric alerts are stateful by default: they fire once, then resolve when the condition clears.
Portal path: Monitor > Alerts > + Create > Alert rule, or New alert rule from Metrics explorer or Logs. Tabs: Scope, Condition, Actions, Details, Tags, Review + create.
az monitor metrics alert create -g rg-ops-alerts -n alert-cpu-high \
--scopes <vm id> --condition "avg Percentage CPU > 80" \
--window-size 5m --evaluation-frequency 1m --severity 2 --action ag-ops
Action groups
An action group is a global resource with a display name of at most 12 characters (it shows up in SMS and emails). It holds:
- Notifications: email, SMS, Azure mobile app push, voice call, and email Azure Resource Manager role (for example every Owner of the subscription).
- Actions: webhook and secure webhook, Logic App, Azure Function, Automation runbook, Event Hubs, ITSM connector.
Azure rate-limits some notifications, for example no more than one SMS or voice call every 5 minutes per number and about 100 emails an hour per address, so an alert storm doesn’t flood a phone. Many alert rules can share one action group; change the on-call number once and every rule follows.
az monitor action-group create -g rg-ops-alerts -n ag-ops --short-name opsteam \
--action email ops ops@contoso.com \
--action sms oncall 1 5555550100 \
--action webhook itsm https://itsm.contoso.com/hooks/azure
$email = New-AzActionGroupEmailReceiverObject -Name ops -EmailAddress ops@contoso.com
New-AzActionGroup -ResourceGroupName rg-ops-alerts -Name ag-ops -ShortName opsteam `
-Location Global -EmailReceiver $email
Alert processing rules
An alert processing rule doesn’t create alerts. It changes what happens to alerts that fire within its scope:
| Setting | Options |
|---|---|
| Rule type | Suppress notifications (removes all action groups) or Apply action group (adds one or more) |
| Filters | Alert rule name, severity, monitor service, resource type, alert context and more |
| Scheduling | Always, At a specific time (one window), or Recurring (daily, weekly or monthly with start and end times and a time zone) |
Suppressed alerts still appear in Monitor > Alerts with their history, so you keep a record. If a suppression rule and an apply rule both match, suppression wins.
az monitor alert-processing-rule create -g rg-ops-alerts -n apr-patch-window \
--scopes /subscriptions/<sub>/resourceGroups/rg-ops-alerts \
--rule-type RemoveAllActionGroups \
--schedule-recurrence-type Weekly --schedule-recurrence Saturday \
--schedule-recurrence-start-time 21:00:00 --schedule-recurrence-end-time 23:59:00
Working with fired alerts
In Monitor > Alerts each alert has a condition state set by Azure (Fired, Resolved) and a user response you set (New, Acknowledged, Closed). Acknowledging tells your team someone is on it; it doesn’t stop the condition.
Architect level Costs, scale and noise
Metric alerts are charged per monitored time series (about $0.10 a month each, illustrative), so one rule over 50 VMs costs more than one over a single VM. Log search alerts are charged by frequency: a 1-minute query costs more than a 15-minute one. SMS and voice notifications cost per message after a free allowance; email and push are free.
To cut noise, use dynamic thresholds for metrics with daily patterns, set a sensible lookback so a 30-second blip doesn’t page anyone, and enable automatically resolve. Use Azure Policy built-in initiatives (Azure Monitor baseline alerts) to create the same alert rules across many subscriptions.
Real-world business scenario
Northwind Retail (fictional)
- The problem
- Thirty alert rules each had their own email list, two of them still sent to people who'd left, and every Saturday night patching triggered 40 SMS messages to the on-call engineer.
- What they used
- One action group (ag-ops) with email, SMS and an ITSM webhook replaced the per-rule email lists. Metric alerts with dynamic thresholds covered CPU and memory, a log search alert covered failed backups, and an activity log alert watched Service Health for their regions. An alert processing rule suppressed notifications every Saturday from 21:00 to 23:59, and a second one applied the security team's action group to all Sev0 and Sev1 alerts.
- Why that choice
- Contacts lived in one place, routing changed in one rule, and planned work stopped waking people up while alerts were still recorded.
- The result
- Saturday pages dropped from about 40 to zero, and when the on-call phone number changed it was updated once.
When to use it and when not to
✓ Use it when…
- A number crosses a threshold and someone should act: a metric alert with an action group.
- A pattern in logs matters, such as repeated failed sign-ins: a log search alert.
- Planned maintenance or broad routing changes: an alert processing rule instead of editing many rules.
✕ Think twice when…
- Alerting on everything at Sev0. People learn to ignore it.
- Disabling alert rules for maintenance and forgetting to turn them back on. Use a scheduled suppression rule.
- Putting personal phone numbers in dozens of rules. Use one shared action group.
↔ Alternatives to consider
- Budgets and cost alerts in Cost Management for spending thresholds.
- Azure Advisor recommendations for slow-moving issues like underused VMs.
- Service Health alerts (activity log alerts) for Azure-side incidents.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between an alert rule and an action group?
Model answer
The alert rule decides when something is wrong, like CPU above 80% for five minutes. The action group decides who hears about it and what happens, like an email to the ops team and a webhook to open a ticket. You build the action group once and reuse it across many rules.
Intermediate Patching every Saturday night reboots servers and pages the on-call engineer. How do you stop that without deleting alerts?
Model answer
An alert processing rule with the suppress notifications type, scoped to the subscription or resource groups, with a recurring weekly schedule for Saturday's window. The alerts still fire and show in the portal, so we have a record, but no action groups are called during the window.
Experienced developer When would you choose a log search alert over a metric alert?
Model answer
When the condition isn't a single metric: counting failed sign-ins, matching an event ID in Windows logs, or combining tables. Metric alerts are near real time and cheaper per rule, so I use them for CPU, memory, availability and queue length. Log search alerts run on a schedule, usually every 5 or 15 minutes, and cost a bit more.
Scenario Security wants every Sev0 and Sev1 alert in the whole subscription to also go to their team. What's the least effort?
Model answer
One alert processing rule scoped to the subscription with a filter on severity Sev0 and Sev1 and the type apply action group, pointing at the security team's action group. No need to edit hundreds of alert rules.
Quick revision
Key points
- Alert rule = scope + signal + condition + severity. Types - metric, log search, activity log (including Service Health and Resource Health), plus smart detection and Prometheus.
- Action groups are global and reusable. Notifications - email, SMS, push, voice, ARM role email. Actions - webhook, secure webhook, Logic App, Function, runbook, Event Hubs, ITSM.
- The action group display name (short name) is at most 12 characters.
- Alert processing rules act after an alert fires - suppress notifications or apply action groups, with filters and an optional schedule (always, once, recurring).
- Alert states - condition (Fired, Resolved) and user response (New, Acknowledged, Closed).
Important terminology
- Alert rule
- A rule with a scope, a signal and a condition that creates an alert when the condition is met.
- Metric alert
- An alert rule on a platform or custom metric, evaluated every minute or more, with static or dynamic thresholds.
- Log search alert
- An alert rule that runs a KQL query on a schedule and fires on the number of results or an aggregated value.
- Activity log alert
- An alert rule that fires when a matching activity log event occurs, including Service Health and Resource Health events.
- Action group
- A reusable, global set of notifications and automated actions that alert rules call when they fire.
- Alert processing rule
- A rule that changes fired alerts in a scope, by suppressing their notifications or adding action groups, optionally on a schedule.
- Severity
- Sev0 (critical) to Sev4 (verbose), set on the alert rule and used for filtering and routing.
- Dynamic threshold
- A metric alert threshold that Azure Monitor learns from the metric's history instead of a fixed number.
Common mistakes
- Editing or disabling dozens of alert rules for a maintenance window instead of one processing rule.
- Thinking a suppression rule stops alerts being created. It only stops notifications and actions.
- Using a metric alert for something that only appears in logs, or a log search alert for a simple CPU threshold.
Exam tips
- "Notify people and call a webhook" = action group. "Mute notifications during maintenance" = alert processing rule with suppress notifications.
- "Alert when someone deletes a VM" or "when Azure reports a service issue in my region" = activity log alert (Service Health).
- "Threshold should adapt to normal patterns" = dynamic threshold on a metric alert.
Five quick revision questions
-
1.What does an action group's short name appear in?Show
SMS and email notifications. It's limited to 12 characters.
-
2.Which alert type runs a KQL query on a schedule?Show
A log search alert.
-
3.What are the two alert processing rule types?Show
Suppress notifications and apply action group.
-
4.Which severity is the most critical?Show
Sev0.
-
5.Does a suppression rule stop alerts from being created?Show
No. Alerts still fire and are listed; only notifications and actions are removed.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Azure Monitor Insights, Network Watcher and Connection Monitor
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.