---
title: Managing alert definitions
summary: null
url: >-
  https://www.fastly.com/documentation/guides/observability/alerts/managing-alert-definitions
---

An alert definition is a configuration rule that defines when an alert should be triggered and how notifications should be handled.

> **HINT:** Want to set up alerting for the Next-Gen WAF? Check out our [Next-Gen WAF](https://www.fastly.com/documentation/guides/next-gen-waf/integrations/integrations-intro) guides.

## Limitations and considerations

Keep the following things in mind:

- The maximum number of alert definitions that can exist at any one time per customer is 50. [Contact support](https://support.fastly.com) to discuss raising this limit.
- By default, you can add alerts for [Historic Stats](https://www.fastly.com/documentation/reference/api/metrics-stats/historical-stats/). To add alerts for Origin Inspector and Domain Inspector metrics, you must purchase an [Observability package](https://docs.fastly.com/products/product-observability).

## About alert definitions

An alert definition is a configuration rule that defines when an alert should be triggered and how notifications should be handled. Specifically, it outlines:

- the observed service, data pipeline, and metric.
- the set of conditions that must be met for an alert to trigger.
- the custom destinations for alert messages (e.g., Slack channels and webhooks).

The condition set defines the threshold, the evaluation period, and whether the alert should trigger when the metric exceeds or remains below the threshold or rate. Specifically:

- A threshold is a static number or a percentage of all requests that the observed metric must either be above or below for the alert to trigger.
- The evaluation period is the number of minutes during which the observed metric is evaluated every minute to determine if the metric has gone above, remained below, or exceeded the threshold during the entire evaluation period.
- The comparison period is the length of time used to compare and evaluate the percentage condition. The first and last minutes of the period will be used to calculate the percentage.

## Creating alert definitions

To create an alert definition, start by navigating to the Add alert definition page using one of these methods:

- On the [**Overview**](https://manage.fastly.com/observability/alerts) page in the **Firing** section, click **Add alert definition**.
- On the [**Alert definitions**](https://manage.fastly.com/observability/alerts/definitions) page, click **Add alert definition**.

![the Add alert definition page](/img/add-alert-definition.png)

Next, fill out the general alert fields as follows:

1. In the **Name** field, enter the name of the alert.
2. In the **Description** field, enter a description of the alert definition.
3. Leave the **All services (aggregated)** value selected if you want to monitor all your services or select **Single service** if you want to monitor a specific service.
4. If you selected **Single service**, fill out the following fields:

   - From the **Service** menu, select a service.
   - From the **Data Source** menu, select a data pipeline. Data pipeline options include [Historic Stats](https://www.fastly.com/documentation/reference/api/metrics-stats/historical-stats/), [Origin Inspector](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-inspector/), and [Domain Inspector](https://www.fastly.com/documentation/reference/api/metrics-stats/domain-inspector/).

Next, define the metric that you want to monitor:

1. If you're monitoring all services or selected `Historic Stats` from the **Data source** menu then, from the **Metric** menu, select the metric that you want to monitor.
2. If you selected `Domain Inspector` from the **Data source** menu, fill out the following fields:
   - From the **Domains** menu, select the domains that you want to monitor.
   - From the **Metric** menu, select the metric that you want to monitor.
3. If you selected `Origin Inspector` from the **Data source** menu, fill out the following fields:
   - From the **Origins** menu, select the origins that you want to monitor.
   - From the **Metric** menu, select the metric that you want to monitor.

Once you've done that, define the conditions that will trigger the alert:

If you selected an error rate or success rate alert type:

1. From the **Evaluation type** menu, select whether the alert should be triggered when the metric is above or below a percentage of overall requests.
2. From the **Threshold** menu, select a percentage of overall requests that the metric must be above or below for the alert to trigger.
3. From the **Evaluation period** menu, select the number of minutes during which the observed metric is evaluated every minute to determine if the metric is above or below the specified threshold. Options include 2 minutes, 5 minutes, 15 minutes, and 30 minutes.

If you selected a threshold alert:

1. From the **Evaluation type** menu, select whether the alert should be triggered when the metric is above or below the threshold.
2. In the **Threshold field**, enter the number that the metric must be above or below for the alert to trigger. To set this field, you can also click and drag the threshold line on the graph.
3. From the **Evaluation period** menu, select the number of minutes during which the observed metric is evaluated every minute to determine if the metric is above or below the specified threshold. Options include 2 minutes, 5 minutes, 15 minutes, and 30 minutes.

If you selected a percentage change alert:

- From the **Evaluation type** menu, select whether the alert should be triggered when the metric increases by, decreases by, or increases or decreases by.
- In the **Percent field**, enter the percent that the metric must either increase by, decrease by, or increases or decreases by for the alert to trigger.
- From the **Comparison Period** menu, select the period during which the observed percentage is evaluated. The first and last minute of the period will be used to calculate the percentage. Options include 2 minutes, 5 minutes, 15 minutes, and 30 minutes.
- _(Optional)_ From the **Excluded Values** menu, select the values below this range that will be disregarded and not used to trigger an alert.

Next, optionally specify where alert notifications should be sent:

1. _(Optional)_ From the **Integration(s)** menu, select the notification channels for the alert.
2. _(Optional)_ Click **Test Alert**. A test notification is sent to the notification channel you selected.

Finally, click **Save Alert** to save the alert. The Alert definitions page appears.

## Editing alert definitions

To edit an alert definition, start by navigating to the Edit alert definition page using one of these methods:

- On the [**Overview**](https://manage.fastly.com/observability/alerts) page in the **Firing** section, click an instance of an alert definition that you want to edit and then click **Edit alert definition**.
- On the [**Alert definitions**](https://manage.fastly.com/observability/alerts/definitions) page, click the pencil <span class="inline-icons"><img src="/img/icons/pencil.png" alt="Pencil icon" /></span> to the right of the alert definition that you want to edit.

Next, update and save the alert definition:

1. Fill out the **Edit alert definition** fields as follows:
   - In the **Name** field, enter the name of the alert.
   - In the **Description** field, enter a description of the alert definition.
   - If the value of the **Data source** menu is `Domain Inspector` then, from the **Domains** menu, select the domains that you want to monitor.
   - If the value of the **Data source** menu is `Origin Inspector` then, from the **Origins** menu, select the origins that you want to monitor.
   - From the **Metric** menu, select the metric that you want to monitor.
   - Under the **Alert type** menu, select whether the alert will trigger from a threshold or percentage change.
   - For thresholds and from the **Evaluation type** menu, select whether the alert should be triggered when the metric is above or below the threshold.
   - For percentage change and from the **Evaluation type** menu, select whether the alert should be triggered when the metric increases by, decreases by, or increases or decreases by.
   - In the **Threshold** field, enter the number that must be above or below for the alert to trigger. To set this field, you can also click and drag the threshold line on the graph.
   - In the **Percent** field, enter the percent that the metric must either increase by, decrease by, or increases or decreases by for the alert to trigger.
   - From the **Evaluation period** menu, select the number of minutes during which the observed metric is evaluated every minute to determine if the metric is above or below the specified threshold. Options include 2 minutes, 5 minutes, 15 minutes, and 30 minutes.
   - From the **Comparison period** menu, select the period during which the observed percentage is evaluated. The first and last minute of the period will be used to calculate the percentage. Options include 2 minutes, 5 minutes, 15 minutes, and 30 minutes.
   - From the **Integration(s)** menu, optionally select or remove notification channels for the alert.
2. _(Optional)_ Click **Test Alert**. A test notification is sent to the notification channel you selected.
3. Click **Save Alert** to save the alert.

## Searching alert definitions

From the [**Alert definitions**](https://manage.fastly.com/observability/alerts/definitions) page, you can search for an existing alert definition by entering a name in the search field. You can also filter definitions using the service filter.

## Deleting alert definitions

From the [**Alert definitions**](https://manage.fastly.com/observability/alerts/definitions) page, you can delete alert definitions by clicking the trash <span class="inline-icons"><img src="/img/icons/trash.png" alt="Trash icon" /></span> to the right of the alert definition that you want to delete. The alert definition is removed from the Alert definitions page.

## Related content

- [Alerts API documentation](https://www.fastly.com/documentation/reference/api/observability/alerts/)
