Metric alerts in Azure Monitor provide a way to get notified when one of your metrics cross a threshold. Metric alerts work on a range of multi-dimensional platform metrics, custom metrics, Application Insights standard and custom metrics.
This blog post shows how to create, view and manage metric alert rules through Azure portal.
Create a metric alert rule
In Azure portal, click on Monitor. The Monitor blade consolidates all your monitoring settings and data in one view.
Click Alerts then click + New alert rule.
Click Select, in the context pane that loads, select a target resource that you want to alert on. My target resource is Storage account.
Use Subscription, Resource type and Location drop-downs to find the resource you want to monitor. You can also use the search bar to find your resource.
Once you have selected a target resource, click on Add condition.
You will see a list of signals supported for the resource, select the metric you want to create an alert on.
In my case I will select Egress
You will see a chart for the metric for the last 6 hours. Define the alert parameters; Condition Type, Frequency, Operator and Threshold or Sensitivity, this will determine the logic which the metric alert rule will evaluate.
If you are using a static threshold, the metric chart can help determine what might be a reasonable threshold. If you are using a Dynamic Thresholds, the metric chart will display the calculated thresholds based on recent data.
Add an action group to the alert either by selecting an existing action group or creating a new action group.
Creating an action group
Select Create New
Enter a name in the Action group name box, and enter a name in the Short name box. The short name is used in place of a full action group name when notifications are sent using this group.
The Subscription box autofills with your current subscription. This subscription is the one in which the action group is saved.
Select the Resource group in which the action group is saved.
Define a list of actions. Provide the following for each action:
a. Name: Enter a unique identifier for this action.
b. Action Type: Select Email/SMS/Push/Voice, Logic App, Webhook, ITSM, or Automation Runbook.
c. Details: Based on the action type, enter a phone number, email address, webhook URI, Azure app, ITSM connection, or Automation runbook. For ITSM Action, additionally specify Work Item and other fields your ITSM tool requires.
Select OK to create the action group.
Fill in Alert details like Alert Rule Name, Description and Severity
Click Create Alert Rule
Metric alert rules created