0
0
Azurecloud~30 mins

Alerts and action groups in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Create Azure Alerts with Action Groups
📖 Scenario: You are managing a cloud environment on Azure. You want to monitor your virtual machines and get notified when CPU usage is high. To do this, you will create an alert rule and connect it to an action group that sends an email notification.
🎯 Goal: Build an Azure alert rule that triggers when CPU usage exceeds 80%, and link it to an action group that sends an email notification to the administrator.
📋 What You'll Learn
Create an action group named HighCpuActionGroup with an email receiver admin@example.com
Create an alert rule named HighCpuAlert for a virtual machine resource
Set the alert condition to trigger when CPU percentage is greater than 80
Link the alert rule to the HighCpuActionGroup
💡 Why This Matters
🌍 Real World
Monitoring cloud resources is essential to maintain performance and availability. Alerts notify administrators about issues early.
💼 Career
Cloud engineers and administrators often configure alerts and action groups to automate monitoring and incident response.
Progress0 / 4 steps
1
Create the action group resource
Create an Azure action group resource named HighCpuActionGroup with an email receiver set to admin@example.com. Use the resource type Microsoft.Insights/actionGroups and include the email receiver configuration.
Azure
Need a hint?

Use the emailReceivers property inside properties to add the email address.

2
Create the alert rule resource
Create an Azure alert rule resource named HighCpuAlert for a virtual machine resource. Use the resource type Microsoft.Insights/metricAlerts and set the target resource ID to /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM.
Azure
Need a hint?

Use the scopes property to specify the VM resource ID.

3
Add the alert condition for CPU usage
Inside the alert rule HighCpuAlert, add a criteria that triggers when the metric Percentage CPU is greater than 80. Use the operator GreaterThan and time aggregation Average.
Azure
Need a hint?

Check the criteria section inside the alert rule properties.

4
Link the alert rule to the action group
In the alert rule HighCpuAlert, add the HighCpuActionGroup to the actions array using its resource ID /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Insights/actionGroups/HighCpuActionGroup.
Azure
Need a hint?

Add the action group resource ID inside the actions array in the alert rule properties.