From d3beed7dd23aa0ccd68e1aaf01728569491da774 Mon Sep 17 00:00:00 2001 From: sabithamuppuri Date: Tue, 13 Jan 2026 13:37:09 -0800 Subject: [PATCH] Docs: add unified_alerting.state_history configuration section (fixes #114670) (#115607) Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com> Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com> --- .../setup-grafana/configure-grafana/_index.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/sources/setup-grafana/configure-grafana/_index.md b/docs/sources/setup-grafana/configure-grafana/_index.md index d9125991c12..d9c5f524bd3 100644 --- a/docs/sources/setup-grafana/configure-grafana/_index.md +++ b/docs/sources/setup-grafana/configure-grafana/_index.md @@ -2030,6 +2030,44 @@ For example: `disabled_labels=grafana_folder`
+### `[unified_alerting.state_history]` + +This section configures where Grafana Alerting writes alert state history. Refer to [Configure alert state history](/docs/grafana//alerting/set-up/configure-alert-state-history/) for end-to-end setup and examples. + +#### `enabled ` + +Enables recording alert state history. Default is `false`. + +#### `backend ` + +Select the backend used to store alert state history. Supported values: `loki`, `prometheus`, `multiple`. + +#### `loki_remote_url ` + +The URL of the Loki server used when `backend = loki` (or when `backend = multiple` and Loki is a primary/secondary). + +#### `prometheus_target_datasource_uid ` + +Target Prometheus data source UID used for writing alert state changes when `backend = prometheus` (or when `backend = multiple` and Prometheus is a secondary). + +#### `prometheus_metric_name ` + +Optional. Metric name for the alert state metric. Default is `GRAFANA_ALERTS`. + +#### `prometheus_write_timeout ` + +Optional. Timeout for writing alert state data to the target data source. Default is `10s`. + +#### `primary ` + +Used only when `backend = multiple`. Selects the primary backend (for example `loki`). + +#### `secondaries ` + +Used only when `backend = multiple`. Comma-separated list of secondary backends (for example `prometheus`). + +
+ ### `[unified_alerting.state_history.annotations]` This section controls retention of annotations automatically created while evaluating alert rules when alerting state history backend is configured to be annotations (see setting [unified_alerting.state_history].backend)