While monitoring a virtual machine we can see different metrics related to a virtual machine in Azure. Azure has also provisioned a way to alert the administrator of virtual machine when these metrics go above or below a specified limit through e-mail. Setting up an alert can be very useful in notifying the administrator about issues that require attention.
Step 1 − Go to the ‘Monitoring’ section of your virtual machine.
Step 2 − Select the metrics you want to set alert for.
Step 3 − Select ‘Add Rule’ from the bottom.
Step 4 − Enter the name for alert and enter other information.
Step 5 − In the following screen that pops up, select condition. It can be greater than, less than or equal to.
Step 6 − Enter the threshold value which will be in percentage. In this example, let’s enter 85 which means you will get an e-mail when utilization for processor of your virtual machine reaches the 85% average over the last 10 minutes.
In addition to sending the alert e-mail to service administrator and co-administrators, you can receive alert in one more e-mail.
You can set maximum 10 alerts for each subscription. Alerts can be sent to the administrator’s e-mail plus one more e-mail provided at the time of setting up an alert.
Similarly, you can set alerts for other Azure services like web applications and mobile applications.