---
title: "Set alert conditions | Grafana Labs"
description: "Define the threshold and conditions that trigger your alert."
---

# Set alert conditions

The alert condition defines when your alert fires. You’ll set a threshold that, when crossed, triggers the alert. For multi-dimensional queries, each series is evaluated independently—so one rule can generate alerts for multiple hosts or services.

To set your alert conditions, complete the following steps:

1. In the **Define query and alert condition** section, scroll to the **Expressions** area.
   
   Grafana automatically adds a **Reduce** expression and a **Threshold** expression to process your query results.
2. Configure the **Reduce** expression:
   
   - **Function**: Select how to reduce the time series to a single value.
     
     For example, select `Last` to use the most recent value, or `Mean` to use the average over the evaluation window.
   - **Input**: Should reference your query (typically `A`).
3. Configure the **Threshold** expression:
   
   - **Input**: Should reference your Reduce expression (typically `B`).
   - **Condition**: Select the comparison operator.
     
     Expand table
     
     | If alerting on | Condition  | Example                            |
     |----------------|------------|------------------------------------|
     | High CPU       | `IS ABOVE` | Fire when CPU &gt; 80%             |
     | Low disk space | `IS BELOW` | Fire when free space &lt; 10GB     |
     | Error rate     | `IS ABOVE` | Fire when errors/min &gt; 10       |
     | Log count      | `IS ABOVE` | Fire when error logs &gt; 50 in 5m |
   - **Value**: Enter your threshold value.
     
     Expand table
     
     | Alert type     | Example value | Notes                          |
     |----------------|---------------|--------------------------------|
     | CPU percentage | `0.8` or `80` | Depends on query output format |
     | Error rate     | `10`          | Errors per minute              |
     | Log count      | `50`          | Errors in evaluation window    |
4. Click **Preview** to test your condition against current data.
   
   The preview shows which series would currently fire (if any) based on your threshold. Use this to validate your threshold is appropriate.
5. Adjust the threshold if needed based on the preview results.
   
   > **Tip:** A good threshold gives you time to respond before the situation becomes critical. For metrics, if your normal CPU is 40-60%, alerting at 80% gives you warning. For logs, if your app normally logs 1-2 errors per minute, alerting at 10 catches real problems.

In the next milestone, you’ll configure how often Grafana evaluates this condition and how long it must persist before firing.

* * *

### More to explore (optional)

- [Configure alert rules](/docs/grafana/latest/alerting/alerting-rules/)
