Creating Alerts In Microsoft Azure

In this article, you will learn how to create alerts in Microsoft Azure.

Introduction

 
Azure Alerts is the part of the toolbox in Azure Monitor. It provides a way to get notified when one of our metrics crosses a threshold. In this article, we will learn how to configure Alerts in Microsoft Azure.
 
Step 1
 
In the Azure Portal, select “Monitoring”, and then select "Alerts". In the Monitor Alerts section, click “Manage Actions”.
 
Creating Alerts In Microsoft Azure
 
Step 2
 
In the Manage Action section, click “+ Add Action Group”.
 
Creating Alerts In Microsoft Azure
 
Step 3
 
In the "Add action group" section, we have to create an Action Group Name, Short Name. Here, the Action Name is “E-Mail”. Then, we need to select Action Type; in this demo, we will select Email/SMS/Push/Voice.
 
Creating Alerts In Microsoft Azure
 
Step 4
 
Now, we need to configure our Email ID, SMS, Azure Apps, and Voice. In this demo, we will use the Email option. So, click the Email checkbox and then enter the email address and click “Ok”.
 
Creating Alerts In Microsoft Azure
 
Step 5
 
In the Azure Portal, select “Monitoring >> Alerts" and select “+ New Alert Rule”.
 
Creating Alerts In Microsoft Azure
 
Step 6
 
Click “Select” under the Resource, and then select your Subscription. We need to select what kind of resources we need to filter, and then select your resource group and the Virtual Machine. Now, click “Done”.
 
Creating Alerts In Microsoft Azure
 
Step 7
 
Now, we need to select the Signal Logic, so, Click “Add” under the Condition, and then select “Percentage CPU”.
 
Creating Alerts In Microsoft Azure
 
Step 8
 
After selecting the Percentage of CPU, now we have to assign the CPU threshold value, so select the operator, threshold value and Aggregation period, and then click “Done”. 
 
Creating Alerts In Microsoft Azure
 
Step 9
 
Now we need to select the Action Group so click “Select Action Group” it’s under the Action, and then select “E-Mail Alerts, and click “Select”.
 
Creating Alerts In Microsoft Azure
 
Step 10
 
Now we need to Create the Alert details, we need to create the Alert rule name and need to set the severity. There are five types of severity and those are,
  • Severity 0 = Critical
  • Severity 1 = Error
  • Severity 2 = Warning
  • Severity 3 = Informational
  • Severity 4 = Verbose
Creating Alerts In Microsoft Azure
 
Step 11
 
After set Severity Click “Create alert rule”.
 
Creating Alerts In Microsoft Azure
 
Step 12
 
Now we can receive the confirmation email from Azure you have added to the alert action group.
 
Creating Alerts In Microsoft Azure
 
Step 13
 
Now we can run the script and test the Virtual Machine CPU usage now It’s 100%.
 
Creating Alerts In Microsoft Azure
 
Step 14
 
Now, we will get the email from Azure, that our CPU usage reached the threshold.
 
Creating Alerts In Microsoft Azure
 
Step 15
 
Also, we can check our CPU usage in the “CPU Usage Heatmap” it’s in the Workbooks (Preview).
 
Creating Alerts In Microsoft Azure
 
Step 16
 
Now, we can verify that our average CPU usage is 78% and we need to fix the CUP usage.
 
Creating Alerts In Microsoft Azure
 
Step 17
 
After fixing our CPU usage issue, we can get the email saying "Your Azure Monitor alert was resolved".
 
Creating Alerts In Microsoft Azure
 

Summary

 
In this article, we have learned how to create Azure Alerts and how to monitor the usage using Workbooks (Preview) mode. If you have any questions, please comment under the article.