Tutorial: Enable recommended alert rules for Azure virtual machine
Alerts in Azure Monitor identify when a resource isn't healthy. When you create a new Azure virtual machine, you can quickly enable a set of recommended alert rules that will provide you with initial monitoring for a common set of metrics including CPU percentage and available memory.
Note
If you selected the Enable recommended alert rules option when you created your virtual machine, then the recommended alert rules described in this tutorial will already exist.
In this article, you learn how to:
- Enable recommended alerts for a new Azure virtual machine.
- Specify an email address to be notified when an alert fires.
- View the resulting alert rules.
Prerequisites
To complete the steps in this article you need the following:
- An Azure virtual machine to monitor.
Create recommended alert rules
From the menu for the VM, select Alerts in the Monitoring section. Select View + set up.
A list of recommended alert rules is displayed. You can select which rules to create. You can also change the recommended threshold. Ensure that Email is enabled and provide an email address to be notified when any of the alerts fire. An action group will be created with this address. If you already have an action group that you want to use, you can specify it instead.
Expand each of the alert rules to see its details. By default, the severity for each is Informational. You might want to change to another severity such as Error.
Select Save to create the alert rules.
View created alert rules
When the alert rule creation is complete, you'll see the alerts screen for the VM.
Click Alert rules to view the rules you just created. You can click on any of the rules to view their details and to modify their threshold if you want.
Next steps
Now that you know have alerting for common VM metrics, create an alert rule to detect when the VM goes offline.