Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 43 of 47
❮Prev Next❯

Alert Rules, Action Groups and Alert Processing Rules

Module 5: Monitor & Backup ⏱ 11 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Action group, metric alert rule and alert processing rule Create an action group, an alert rule and a processing rule.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    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
    1. In Monitor → Alerts you see fired alerts by severity and their state (New, Acknowledged, Closed). Start with who gets told: Action groups.
    2. Name it and give it a short display name (12 characters at most). Action groups are global and reusable across many alert rules.
    3. 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.
    4. On Actions, a webhook opens a ticket automatically. Review and create.
    5. Now the rule. Scope is vm-app01. On Condition: Average Percentage CPU greater than 80, checked every minute over a 5-minute lookback.
    6. On Actions you selected ag-ops. On Details, set Severity 2 and the name. A metric alert resolves itself when CPU drops back.
    7. Saturday patching reboots every VM and pages everyone. An alert processing rule with Suppress notifications fixes that.
    8. 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.

    😟 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
    🛠️ Solved with: Alerts and processing rules

    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. 1 Alert rule

      Average Percentage CPU on vm-app01 > 80% over 5 minutes, checked every minute. Severity 2.

    2. 2 Alert

      The condition holds, so an alert is created in state Fired / New.

    3. 3 Processing rule

      Is any rule active for this scope right now? Suppress, or add another action group.

    4. 4 Action group

      Email ops, SMS the on-call phone, call the ITSM webhook.

    From a CPU spike to a phone call

    Alert rule types

    TypeSignalEvaluatedUse it for
    MetricPlatform or custom metricEvery 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 searchA KQL query on a workspaceOn a schedule (1 minute to 24 hours)Event IDs, failed sign-ins, patterns across tables
    Activity logActivity log eventsWhen 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, PrometheusApplication Insights, managed PrometheusVariesApp 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:

    SettingOptions
    Rule typeSuppress notifications (removes all action groups) or Apply action group (adds one or more)
    FiltersAlert rule name, severity, monitor service, resource type, alert context and more
    SchedulingAlways, 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

    Retail

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    You need to send an email and an SMS message to the operations team and call an ITSM webhook when any of 25 alert rules fires. The solution must minimize administrative effort when the contact details change. What should you create?

    Question 2

    Question 2 of 5

    Patches are installed on all virtual machines in a resource group every Saturday from 22:00 to 02:00. Alerts that fire during this window must still be recorded, but no notifications must be sent. What should you configure?

    Question 3

    Question 3 of 5

    You create an action group. The display name that you enter is rejected. What is the most likely cause?

    Question 4

    Question 4 of 5

    You must be notified when Azure reports a service incident that affects virtual machines in the regions that your subscription uses. Which type of alert rule should you create?

    Question 5

    Question 5 of 5 · Select 2

    The security team must receive every Sev0 and Sev1 alert that fires in a subscription that contains more than 200 alert rules. Which two actions should you perform? Each correct answer presents part of the solution.

    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. 1.What does an action group's short name appear in?Show

      SMS and email notifications. It's limited to 12 characters.

    2. 2.Which alert type runs a KQL query on a schedule?Show

      A log search alert.

    3. 3.What are the two alert processing rule types?Show

      Suppress notifications and apply action group.

    4. 4.Which severity is the most critical?Show

      Sev0.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.