- Documentation
- Learning Hub
- Journey Introduction to Grafana Alerting
- Section 2 of 6 Name and query
Alert condition
Alert condition
The alert condition defines when an alert moves toward firing. A threshold is the value the condition compares against.
The condition watches a value over time. If the value stays at or below the threshold, the alert stays normal. When it rises above the threshold and stays there through the pending period you configure later, the alert fires.
For this journey’s QuickPizza server-errors example, the value is how many new 5xx responses arrived in the last five minutes. Alert when that count is above 0 so any server errors in the window can trigger the rule. The alert condition has two parts:
- Is above is the operator.
- 0 is the threshold.
Important: verify after setting
Always click Preview alert rule condition to verify which instances would fire. If you change the operator from Is above to Is below, double-check that the threshold value still makes sense.