An alert rule monitors and captures a signal that indicates that something is happening on a specified target. The alert rule captures the signal and checks to see if the signal meets the criteria of the condition. If the conditions are met, an alert is triggered, which initiates the associated action group and updates the state of the alert.
You can use multiple conditions on an alert rule for a single resource. The target of the metric alert rule can be a single resource or multiple resources of the same type in the same Azure region, such as a resource group.
For more information on monitoring multiple resources, see Monitor Multiple Resources.
For more information on multiple conditions, see Multiple Conditions.
Configure Metric Alerts
A metric alert rule monitors a resource by evaluating conditions on the resource metrics at regular intervals. If the conditions are met, an alert is triggered.
To configure metric alerts, follow the below steps:
- In Azure Portal, select Monitor > Alerts.
- Select Alert rule (most resource blades also have Alerts in the resource menu under Monitoring, you can also create alert rules from Monitoring.)
- In the Scope tab, click Select scope.
- In the context pane, select the target resource(s) that you want to trigger the alert. You can filter by subscription, resource type, and resource location.
- Click Done once you have selected a target resource.
- Select Condition at the bottom of the page.
- In the Select a signal pane, select the signal type as metrics and monitor service as platform to generate metric alerts.
You will see a chart showing the metric’s behavior for the last six hours .If the metric has dimensions, you will see a dimensions table presented. Optionally, select one or more values per dimension. The displayed dimension values are based on metric data from the last day.
Select the Threshold type, Operator, and Aggregation type. This will determine the logic that the metric alert rule will evaluate.
If you are using a Static threshold, continue to define a Threshold value. The metric chart helps you to determine a reasonable threshold value.
If you are using a Dynamic threshold, continue to define the Threshold sensitivity. The metric chart will display the calculated thresholds based on recent data.
- In the Actions tab, you can define what actions and notifications are triggered when the alert rule generates an alert. You can add an action group to the alert rule either by selecting an existing action group or by creating a new action group (see Create Action Group for more information).
- In the Details tab, define the Project details by selecting the Subscription and Resource group.
- Under Alert rule details, specify the Severity and Alert rule name. You can also provide an Alert rule description.
- In the Review + create tab, a validation will run and inform you of any issues.
- When validation passes and you have reviewed the settings, select the Create button.
Configure resource health alerts
See Create Resource Health alerts to create resource health alerts.
Configure service health alerts
See Create Service Health alerts to create service health alerts.
Create Action Group
An action group can trigger notifications or an automated workflow to let users know that an alert has been triggered.
To create an action group, follow the below steps:
- In Azure monitors, select Alerts > Action groups.
- Under Project details, select values for Subscription and Resource group. The action group is saved in the subscription and the selected resource group.
- In the Instance details, enter values for Action group name and Display name.
- In the Actions tab, define Event Hub as action type to trigger when an alert is triggered.
- Select the subscription, event hub namespace, event hub name and turn on the common alert schema.
- Enter a unique name for the action. To review your settings select Review + create.
7. After you have reviewed the settings, select Create to create the action group.
Alert Processing Rule
See Alert processing rules for more information on alert processing rules.