Alerting: Use GRAFANA_ALERTS as the default state history metric name (#107050)

This commit is contained in:
Alexander Akhmetov
2025-06-20 18:14:36 +02:00
committed by GitHub
parent 5520f48153
commit a76057cedb
3 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -1477,7 +1477,7 @@ enabled = true
# Select which pluggable state history backend to use. Either "annotations", "loki", "prometheus", or "multiple"
# "loki" writes state history to an external Loki instance.
# "prometheus" writes state history as ALERTS metrics to a Prometheus-compatible data source.
# "prometheus" writes state history as GRAFANA_ALERTS metrics to a Prometheus-compatible data source.
# "multiple" allows history to be written to multiple backends at once.
# Defaults to "annotations".
backend =
@@ -1529,15 +1529,15 @@ loki_max_query_length = 721h
loki_max_query_size = 65536
# For "prometheus" only.
# Target datasource UID for writing ALERTS metrics.
# Target datasource UID for writing GRAFANA_ALERTS metrics.
prometheus_target_datasource_uid =
# For "prometheus" only.
# Metric name for the ALERTS metric. Default is "ALERTS".
prometheus_metric_name = ALERTS
# Metric name for the GRAFANA_ALERTS metric. Default is "GRAFANA_ALERTS".
prometheus_metric_name = GRAFANA_ALERTS
# For "prometheus" only.
# Timeout for writing ALERTS metrics to the target datasource. Default is 10s.
# Timeout for writing GRAFANA_ALERTS metrics to the target datasource. Default is 10s.
prometheus_write_timeout = 10s
[unified_alerting.state_history.external_labels]
+5 -5
View File
@@ -1456,7 +1456,7 @@ disabled_labels =
# Select which pluggable state history backend to use. Either "annotations", "loki", "prometheus", or "multiple"
# "loki" writes state history to an external Loki instance.
# "prometheus" writes state history as ALERTS metrics to a Prometheus-compatible data source.
# "prometheus" writes state history as GRAFANA_ALERTS metrics to a Prometheus-compatible data source.
# "multiple" allows history to be written to multiple backends at once.
# Defaults to "annotations".
; backend = "multiple"
@@ -1508,15 +1508,15 @@ disabled_labels =
;loki_max_query_size = 65536
# For "prometheus" only.
# Target datasource UID for writing ALERTS metrics.
# Target datasource UID for writing GRAFANA_ALERTS metrics.
; prometheus_target_datasource_uid = "my-prometheus-uid"
# For "prometheus" only.
# Metric name for the ALERTS metric. Default is "ALERTS".
; prometheus_metric_name = "ALERTS"
# Metric name for the GRAFANA_ALERTS metric. Default is "GRAFANA_ALERTS".
; prometheus_metric_name = "GRAFANA_ALERTS"
# For "prometheus" only.
# Timeout for writing ALERTS metrics to the target datasource. Default is 10s.
# Timeout for writing GRAFANA_ALERTS metrics to the target datasource. Default is 10s.
; prometheus_write_timeout = 10s
[unified_alerting.state_history.external_labels]
+1 -1
View File
@@ -68,7 +68,7 @@ const (
defaultRecordingRequestTimeout = 10 * time.Second
lokiDefaultMaxQuerySize = 65536 // 64kb
defaultHistorianPrometheusWriteTimeout = 10 * time.Second
defaultHistorianPrometheusMetricName = "ALERTS"
defaultHistorianPrometheusMetricName = "GRAFANA_ALERTS"
)
var (