Complete the code to create an alert rule that triggers when CPU usage exceeds 80%.
az monitor metrics alert create --name HighCPUAlert --resource-group MyResourceGroup --scopes MyVMResourceId --condition "avg Percentage CPU > [1]" --window-size 5m --evaluation-frequency 1m
The alert triggers when the average CPU usage is greater than 80%, so the correct threshold is 80.
Complete the code to add an action group that sends an email when the alert fires.
az monitor action-group create --name MyActionGroup --resource-group MyResourceGroup --short-name MyActionGroup [1] EmailReceiver admin@example.comThe correct parameter to specify an email receiver in Azure CLI is --email-receiver.
Fix the error in the alert condition syntax to correctly monitor disk space below 10%.
az monitor metrics alert create --name LowDiskSpace --resource-group MyResourceGroup --scopes MyDiskResourceId --condition "avg [1] < 10" --window-size 5m --evaluation-frequency 1m
The correct metric name for monitoring free disk space percentage is LogicalDisk\% Free Space with the backslash escaping the percent sign.
Fill both blanks to create an alert rule that triggers when memory usage is above 75% and sends an SMS notification.
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]
The metric to monitor memory usage is Percentage Memory Used. The action group to send SMS notifications is MySMSActionGroup.
Fill all three blanks to create an action group with email, SMS, and webhook receivers.
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
The correct parameters for action group receivers are --email-receiver, --sms-receiver, and --webhook-receiver.