---
title: Recovery thresholds
description: >-
  Configure recovery thresholds to add conditions for monitor recovery from
  alert states and reduce alert flapping noise.
breadcrumbs: Docs > Monitors > Monitor Guides > Recovery thresholds
---

# Recovery thresholds

## Definition{% #definition %}

Recovery thresholds are optional thresholds added to a monitor to indicate an additional condition to a monitor's recovery from alert or warning states.

## Behavior{% #behavior %}

The recovery threshold adds a condition to the monitor's recovery such that it only enters recovered state once it has **passed** the recovery threshold. If no recovery threshold is set, the monitor recovers whenever the alert conditions are no longer met.

The recovery threshold is satisfied with the recovery condition is met. The recovery condition varies based on the alert condition:

| Alert condition     | Recovery condition           |
| ------------------- | ---------------------------- |
| \> alert threshold  | <= alert recovery threshold  |
| \>= alert threshold | < alert recovery threshold   |
| < alert threshold   | \>= alert recovery threshold |
| <= alert threshold  | \> alert recovery threshold  |

## Use case{% #use-case %}

Recovery thresholds reduce noise of a flapping monitor. This can increase confidence that upon recovery, the alerting metric has recovered and the issue is resolved.

## How to set up recovery thresholds?{% #how-to-set-up-recovery-thresholds %}

### Website UI{% #website-ui %}

Set the alert or warning recovery threshold when creating a monitor under **Set alert conditions** > **Advanced Options**.

### API{% #api %}

When you [create/edit a monitor via the API](https://docs.datadoghq.com/api/v1/monitors/), use the attributes `critical_recovery` and `warning_recovery` in the `options.thresholds` attribute of your JSON monitor:

```text
"thresholds": {
                "critical": 80,
                "warning": 60,
                "critical_recovery": 70,
                "warning_recovery": 50
              }
```

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

- [Metric monitor](https://docs.datadoghq.com/monitors/types/metric/)
