[release-12.0.3] docs(alerting): add new guidelines to the missing data alerting guide (#107272)

docs(alerting): add new guidelines to the missing data alerting guide (#107232)

(cherry picked from commit ff4d7d35c6)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2025-06-30 10:00:23 +02:00
committed by GitHub
co-authored by Pepe Cano
parent e6b078bc0f
commit be35f2dd83
@@ -201,6 +201,9 @@ Grafana Alerting handles distinct scenarios automatically. Here’s how to think
- Use Grafana’s _No Data_ handling options to define what happens when a query returns nothing.
- When _NoData_ is not an issue, consider rewriting the query to always return data — for example, in Prometheus, use `your_metric_query OR on() vector(0)` to return `0` when `your_metric_query` returns nothing.
- Use `absent()` or `absent_over_time()` in Prometheus for fine-grained detection when a metric or label disappears entirely.
- If data is frequently missing due to scrape delays, use techniques to account for data delays:
- Adjust the **Time Range** query option in Grafana to evaluate slightly behind real time (e.g., set **To** to `now-1m`) to account for late data points.
- In Prometheus, you can use `last_over_time(metric_name[10m])` to pick the most recent sample within a given window.
- Don’t alert on every instance by default. In dynamic environments, it’s better to aggregate and alert on symptoms — unless a missing individual instance directly impacts users.
- If you’re getting too much noise from disappearing data, consider adjusting alerts, using `Keep Last State`, or routing those alerts differently.
- For connectivity issues involving alert query failures, see the sibling guide: [Handling connectivity errors in Grafana Alerting](ref:connectivity-errors-guide).