---
title: "Set the alert condition and recovery | Grafana Labs"
description: "Set a threshold, preview the result, then add a recovery threshold."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Set the alert condition and recovery

Your query returns a percentage. Tell Grafana when that percentage is too high, then add a recovery threshold so the alert doesn’t flap near the trigger point.

Set the threshold to **5** so the alert fires when the error rate goes above 5%. Then set recovery to **3** so it returns to normal only after the rate drops below 3%.

1. In the **Alert condition** section, leave **Is above** selected.
2. Set the threshold to `5`.
3. Click **Preview alert rule condition** to evaluate the threshold against your query.
   
   Look for a result row above the button (for example **Series 1** with a value). It may show **Normal** or **Firing**. With a threshold of **5**, **Normal** is expected when the error rate is under 5% right now.
4. Still in **Define query and alert condition**, turn on **Advanced options** at the top of that section.
5. Scroll down to the **Expressions** area and open the **C Threshold** block. Under **IS ABOVE**, turn on **Custom recovery threshold**.
6. Still in **C Threshold**, in **Stop alerting (or pending state) when below**, set the value to **3**.

The condition and recovery threshold are set. Next, you pick a folder and add labels so the alert is easy to find and organize.
