Set alerts on Azure Event Grid metrics and activity logs

This article describes how to create alerts on Azure Event Grid metrics and activity log operations. You can create alerts on both publish and delivery metrics for Azure Event Grid resources (topics and domains). For system topics, create alerts using the Metrics page.

Create alerts on dead-lettered events

The following procedure shows you how to create an alert on dead-lettered events metric for a custom topic. In this example, an email is sent to the Azure resource group owner when the dead-lettered event count for a topic goes above 10.

  1. On the Event Grid Topic page for your topic, select Alerts on the left menu, and then select +New alert rule.

    Alerts page - New alert rule button

  2. On the Create alert rule page, verify that your topic is selected for the resource. Then, click Select condition.

    Alerts page - select condition

  3. On the Configure signal logic page, follow these steps:

    1. Select a metric or an activity log entry. In this example, Dead Lettered Events is selected.

      Select dead-lettered events

    2. Select dimensions (optional).

      Configure signal logic

      Note

      You can select + button for EventSubscriptionName to specify an event subscription name to filter events.

    3. Scroll down. In the Alert logic section, select an Operator, Aggregation type, and enter a Threshold value, and select Done. In this example, an alert is triggered when the total dead lettered events count is greater than 10.

      Alert logic

  4. Back on the Create alert rule page, click Select action group.

    Select action group button

  5. Select Create action group on the toolbar to create a new action group. You can also select an existing action group.

  6. On the Add action group page, follow these steps:

    1. Enter a name for the action group.

    2. Enter a short name for the action group.

    3. Select an Azure subscription in which you want to create the action group.

    4. Select the Azure resource group in which you want to create the action group.

    5. Enter a name for the action.

    6. Select the action type. In this example, Email Azure Resource Manager Role is selected, specifically the Owners role.

    7. Select OK to close the page.

      Add action group page

  7. Back on the Create alert rule page, enter a name for the alert rule, and then select Create alert rule.

    Alert rule name

  8. Now, on the Alerts page of the topic, you see a link to manage alert rules if there are no alerts yet. If there are alerts, select Manager alert rules on the toolbar.

    Manage alerts

Create alerts on other metrics or activity log operations

The previous section showed you how to create alerts on dead-lettered events. The steps for create alerts on other metrics or activity log operations are similar.

For example, to create an alert on a delivery failure event, select Delivery failed events on the Configure signal logic page.

Select Delivery failed events

Create alerts using the Metrics page

You can also create alerts by using the Metrics page. The steps are similar. For system topics, you can only use the Metrics page to create alerts, as the Alerts page isn't available.

Metrics page - Create alert button

Note

This article doesn't cover all the different steps and combinations that you can use to create an alert. For an overview of alerts, see Alerts overview.

Next steps