0
0
Azurecloud~10 mins

Alerts and action groups in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an alert rule that triggers when CPU usage exceeds 80%.

Azure
az monitor metrics alert create --name HighCPUAlert --resource-group MyResourceGroup --scopes MyVMResourceId --condition "avg Percentage CPU > [1]" --window-size 5m --evaluation-frequency 1m
Drag options to blanks, or click blank then click option'
A70
B100
C90
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using a threshold lower than 80 causes too many alerts.
Using a threshold higher than 80 might miss important alerts.
2fill in blank
medium

Complete the code to add an action group that sends an email when the alert fires.

Azure
az monitor action-group create --name MyActionGroup --resource-group MyResourceGroup --short-name MyActionGroup [1] EmailReceiver admin@example.com
Drag options to blanks, or click blank then click option'
A--email-receiver
B--email
C--email-address
D--receiver-email
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect parameter names like '--email' or '--email-address'.
Missing the required parameter for email receiver.
3fill in blank
hard

Fix the error in the alert condition syntax to correctly monitor disk space below 10%.

Azure
az monitor metrics alert create --name LowDiskSpace --resource-group MyResourceGroup --scopes MyDiskResourceId --condition "avg [1] < 10" --window-size 5m --evaluation-frequency 1m
Drag options to blanks, or click blank then click option'
ADisk Space
BLogicalDisk\% Free Space
CLogicalDisk Free Space
DFree Disk Space
Attempts:
3 left
💡 Hint
Common Mistakes
Using metric names without escaping special characters.
Using incomplete or incorrect metric names.
4fill in blank
hard

Fill both blanks to create an alert rule that triggers when memory usage is above 75% and sends an SMS notification.

Azure
az monitor metrics alert create --name HighMemoryAlert --resource-group MyResourceGroup --scopes MyVMResourceId --condition "avg [1] > 75" --window-size 5m --evaluation-frequency 1m --action-group [2]
Drag options to blanks, or click blank then click option'
APercentage Memory Used
BMyEmailActionGroup
CMySMSActionGroup
DMemory Usage
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect metric names like 'Memory Usage'.
Using the wrong action group for SMS notifications.
5fill in blank
hard

Fill all three blanks to create an action group with email, SMS, and webhook receivers.

Azure
az monitor action-group create --name MultiChannelGroup --resource-group MyResourceGroup --short-name MultiChannelGroup [1] EmailReceiver user@example.com [2] SMSReceiver +1234567890 [3] WebhookReceiver https://example.com/alert
Drag options to blanks, or click blank then click option'
A--email-receiver
B--sms-receiver
C--webhook-receiver
D--email
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect parameter names like '--email' instead of '--email-receiver'.
Mixing up parameters between receiver types.