AZ-104 Question 245
Select 2You have an Azure virtual machine (VM) running a critical application. You need Azure Monitor to automatically send you an email if the VM’s CPU usage remains above 80% for five continuous minutes. Which TWO actions must you perform to achieve this?
- A
Create a new metric alert rule on the VM, selecting the CPU usage metric, setting the threshold to 80%, and specifying the condition duration as 5 minutes.
- B
Enable diagnostic settings on the VM to forward performance metrics to a Log Analytics workspace.
- C
Create an action group in Azure Monitor and link it to the metric alert, specifying your email address as the notification endpoint.
- D
Configure an Activity log alert at the subscription level with a condition that triggers when CPU usage exceeds 80%.
Show answer and explanation
Correct answers: A, C
Explanation
To monitor VM CPU usage and receive email notifications, you must create a metric alert rule for CPU usage and associate it with an action group that sends the alert email. Diagnostic settings and Activity log alerts are not required for metric-based CPU alerts.
- A. Correct.
Creating a metric alert rule is necessary to monitor CPU usage directly, specify a threshold, and set the duration to 5 minutes for continuous monitoring.
- B. Incorrect.
Enabling diagnostic settings to forward metrics to Log Analytics is useful for detailed analysis and custom logs, but not strictly required for basic metric alerts on CPU usage.
- C. Correct.
An action group must be created and linked to the metric alert to define the notification settings, such as sending an email when the alert is triggered.
- D. Incorrect.
Activity log alerts track events in the Azure Activity log (like resource creation or deletion), not VM performance metrics such as CPU usage.