Alerting on metrics

Just as with log entries, it is possible to be alerted by Azure Monitor when a metric goes above or below a certain threshold. Log entries that require a follow up could be related to only a single user or customer that is having trouble. Metrics, on the other hand, are useful for detecting situations where all users are impacted by an issue, or situations where infrastructure no longer works or will stop working soon.

Creating alerts for metrics works in a way that is very similar to creating alerts from logs. To create a new alert rule, navigate to Azure Monitor using the portal and then choose Alerts. Next, click on the New Alert Rule button to open the view shown in the following screenshot:

In this screenshot, the following selections have to be made to create an alert on a metric:

  1. Select the resource that is the subject for the alert. This can be any type of resource that outputs metrics—in this instance, an Application Insights workspace has been selected.
  2. Configure the condition to raise the alert under. For this, a new window opens on the right. To get to the view in the preceding screenshot, select a Metric alert type and from the list that populates, choose the correct alert. Next, the view changes to what is shown in the preceding screenshot. Here, the following selections must be made:
    • Select the threshold for the alert to raise (refer to 2a in the previous screenshot). Static thresholds are the default and require the configuration of an operator, aggregation type, and value.
    • Pick the granularity interval that the alert should be evaluated over (2b).
    • Pick the frequency of evaluation (2c). The more often an alert is evaluated, the shorter the delay between an occurrence and the alert that is sent out.
    • Save the alert condition (2d).
  3. Select one or more action groups that need to be triggered when the alert condition has been met.
  4. Configure an alert rule name and description.
  5. Save the alert.

The alert becomes active within minutes after saving. Now, whenever an alert condition is met, the developers are notified using the methods configured in the alert group.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.151.106