Variant: Portal lab track (CLI/ARM walkthrough omitted).
Create an Action Group and CPU metric alert for a VM, then validate alert rule scope and action routing.
[VM CPU Metric] | v [Metric Alert Rule] | v [Action Group] | v [Email Notification]
40-55 minutes
- One VM is used as alert signal target.
- Alert emails may be sent when threshold conditions are met.
- Delete resources after validation.
- Azure subscription with rights to create VM and Monitor resources
- Azure Portal access
- A valid email inbox for Action Group testing
Use the following values when entering names and settings in the portal steps:
- LOCATION: australiaeast
- PREFIX: az104
- LAB: m05alerts
- RG_NAME: ${PREFIX}-${LAB}-rg
- VM_NAME: ${PREFIX}-${LAB}-vm
- AG_NAME: ${PREFIX}-${LAB}-ag
- ALERT_NAME: ${PREFIX}-${LAB}-cpu-high
- Open Resource groups and create ${RG_NAME} in ${LOCATION}.
- Open Virtual machines and create ${VM_NAME} in ${RG_NAME}.
- Choose Ubuntu Server 22.04 LTS and a small size (B1s or equivalent).
- Complete deployment.
- Open Monitor.
- Select Alerts > Action groups > Create.
- In Basics:
- Resource group: ${RG_NAME}
- Action group name: ${AG_NAME}
- Display name: m05ag
- In Notifications:
- Notification type: Email/SMS/Push/Voice
- Name: OpsEmail
- Email: your monitored inbox
- Select Review + create, then Create.
- Open ${VM_NAME}.
- Select Alerts > Create > Alert rule.
- Scope should already be the VM. Confirm scope is correct.
- Condition:
- Signal type: Metric
- Signal name: Percentage CPU
- Aggregation: Average
- Operator: Greater than
- Threshold: 70
- Evaluation granularity: 1 minute
- Lookback period: 5 minutes
- Actions:
- Select existing Action Group ${AG_NAME}.
- Details:
- Alert rule name: ${ALERT_NAME}
- Severity: 2
- Enable rule on creation: Yes
- Select Review + create, then Create.
- Open Monitor > Alerts > Alert rules.
- Confirm ${ALERT_NAME} is Enabled and scoped to ${VM_NAME}.
- Open the alert rule and verify ${AG_NAME} is attached under Actions.
- Optional: generate CPU load on VM and check Monitor > Alerts > Fired alerts.
- In Azure Portal, open Resource groups and select
${RG_NAME}. - Select Overview > Delete resource group.
- Enter
${RG_NAME}to confirm deletion, then select Delete. - Wait for deployment notifications to confirm cleanup is complete.
- Delete the local
.envfile from your lab folder.
- Start with meaningful thresholds based on baseline workload behavior.
- Action Groups are reusable and should be standardized by environment.