---
title: Change Alert Monitor
description: >-
  Create change alert monitors to detect significant changes in metrics over
  time using absolute or percentage change thresholds.
breadcrumbs: Docs > Monitors > Monitor Types > Change Alert Monitor
---

# Change Alert Monitor

## Overview{% #overview %}

Metric monitors are one of the most commonly used type of monitor. This guide clarifies the change alert detection method's behavior and its additional options. Learn how change alert monitors work and how to troubleshoot change alert evaluations.

## What are change alert monitors?{% #what-are-change-alert-monitors %}

Here is a breakdown of how monitors with the change detection method work:

1. The monitor takes a query of data points at the current time.
1. It takes a query of data points N minutes, hours, or days ago.
1. Then, it takes a query of the difference of the values between (1) and (2).
1. Aggregation is applied over the query in (3) which returns a single value.
1. The threshold defined in **Set alert conditions** is compared to the single value returned in (4).

## Monitor creation{% #monitor-creation %}

To create a [Change Alert monitor](https://app.datadoghq.com/monitors/create/metric/change) in Datadog, use the main navigation: *Monitors –> New Monitor –> Change*.

## Evaluation conditions{% #evaluation-conditions %}

Here are the different options that you need to configure in a change alert monitor.

{% image
   source="https://datadog-docs.imgix.net/images/monitors/monitor_types/change-alert/configure_define_the_metrics.fbfea4a43d7bca9b43b065710bc7e656.png?auto=format"
   alt="Configuration options for change alert detection method" /%}

The example shows the following alert condition: The **average** of the **change** over **1 hour** compared to **5 minutes**

| Options selected | Description                                                                                                                                                       | Options                                                              |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| average          | The aggregation that is used on the query.                                                                                                                        | `Average`, `Maximum`, `Minimum`, `Sum`                               |
| change           | Choose between the absolute or percentage change of the value.                                                                                                    | `change` or `% change`                                               |
| 1 hour           | The evaluation window. For more information, see the [Monitor Configuration](https://docs.datadoghq.com/monitors/configuration/#evaluation-window) documentation. | This can be N minutes, hours, days, weeks, or at most one month.     |
| 5 minutes        | The timeframe that you wish to shift the query by.                                                                                                                | This can be N minutes, hours, days, weeks, or at most one month ago. |

### Change and change %{% #change-and-change- %}

There are two options when configuring a change alert detection, **Change** and **% Change**.

This determines the way the monitor evaluates as expressed in the formula section in the following table:

| Option   | Description                                                        | Formula               |
| -------- | ------------------------------------------------------------------ | --------------------- |
| Change   | The absolute change of the value.                                  | `a - b`               |
| % Change | The percentage change of the value compared to its previous value. | `((a - b) / b) * 100` |

In both cases, `Change`, and `% Change` can be either positive or negative.

## Notifications{% #notifications %}

For instructions on the **Configure notifications and automations** section, see the [Notifications](https://docs.datadoghq.com/monitors/notify/) and [Monitor configuration](https://docs.datadoghq.com/monitors/configuration/?tab=thresholdalert#configure-notifications-and-automations) pages.

## Troubleshooting a change alert evaluation{% #troubleshooting-a-change-alert-evaluation %}

To verify the results of your change alert evaluation, reconstruct the metric queries with a Notebook. Take this change alert monitor with the following settings.

{% image
   source="https://datadog-docs.imgix.net/images/monitors/monitor_types/change-alert/example_monitor_config.6fecec3093eb98edadb8a5d18dab81d4.png?auto=format"
   alt="The create monitor page with a change alert selected, evaluating the percent change of the average of the metric system.load.1 over the last 5 minutes compared to the last 30 minutes" /%}

Monitor Query: `pct_change(avg(last_5m),last_30m):<METRIC> > -50`

This is a break down of the query with the following conditions:

1. Aggregation of **avg**.
1. Uses **% change**.
1. Evaluation window of **5 minutes**.
1. Timeshift of **30 minutes** or 1800 seconds.
1. Threshold of **> -50**.

### Reconstructing the query{% #reconstructing-the-query %}

1. Use a [notebook](https://docs.datadoghq.com/monitors/status/#investigate-a-monitor-in-a-notebook) and the [timeshift function](https://docs.datadoghq.com/dashboards/functions/timeshift/) to reconstruct the data used by the monitor at a specific evaluation.
   - Query of data points at the current time (this is the normal query).
   - Query of data points N minutes ago (this is the normal query + timeshift(-1800)).
   - The timeshift function uses a **negative** duration because you're shifting the data back. Combine these queries along with the % change formula from the table.
   - **Note**: Since this example only has one metric, it's also possible to use a single query (a) and add the formula `((a - timeshift(a, -1800)) / timeshift(a, -1800)) * 100`
     {% image
        source="https://datadog-docs.imgix.net/images/monitors/monitor_types/change-alert/notebook_query_reconstruct_timeshift.566e1cab2c9866e494cf016b826150a7.png?auto=format"
        alt="The edit screen of a cell in a notebook, titled Reconstruct Change Alert query, configured as a timeseries using the average of the metric system.load.1, from everywhere, with the formula ((a - timeshift(a, -1800)) / timeshift(a, -1800)) * 100 being applied" /%}
1. Compare the monitor's history graph with the notebook graph. Are the values comparable?
1. Apply the aggregation.
   - To compare your notebook graph to the change alert monitor evaluation, scope your timeframe to match the change alert.
   - For example, if you are looking to verify the value of a monitor evaluation over the last five minutes at 1:30, scope your notebook to 1:25 - 1:30.

## Further reading{% #further-reading %}

- [Choose the detection method of Metric Monitors](https://docs.datadoghq.com/monitors/types/metric/?tab=change#choose-the-detection-method)
- [Learn how to configure monitors](https://docs.datadoghq.com/monitors/configuration/)
