Alerting: Add support for Redis Sentinel for Alerting HA (#106322)

* Alerting: Add support for Redis Sentinel

* docs

* docs

* Use minisentinel in test

* Apply suggestions from code review

Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com>
Co-authored-by: Fayzal Ghantiwala <114010985+fayzal-g@users.noreply.github.com>

* "address(es)" -> "address or addresses"

* make update-workspace

* make lint-go-diff

---------

Co-authored-by: Johnny Kartheiser <140559259+JohnnyK-Grafana@users.noreply.github.com>
Co-authored-by: Fayzal Ghantiwala <114010985+fayzal-g@users.noreply.github.com>
This commit is contained in:
Vadim Stepanov
2025-06-05 15:02:40 +01:00
committed by GitHub
co-authored by Johnny Kartheiser Fayzal Ghantiwala
parent 941162ca79
commit 5137995830
11 changed files with 292 additions and 80 deletions
+39 -28
View File
@@ -1261,68 +1261,79 @@
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;alertmanager_config_poll_interval = 60s
# Maximum number of active and pending silences that a tenant can have at once. Default: 0 (no limit).
;alertmanager_max_silences_count =
# Maximum silence size in bytes. Default: 0 (no limit).
;alertmanager_max_silence_size_bytes =
# Set to true when using redis in cluster mode.
;ha_redis_cluster_mode_enabled = false
# The redis server address(es) that should be connected to.
# Can either be a single address, or if using redis in cluster mode,
# the cluster configuration address or a comma-separated list of addresses.
# Redis server address or addresses. It can be a single Redis address if using Redis standalone,
# or a list of comma-separated addresses if using Redis Cluster/Sentinel.
;ha_redis_address =
# The username that should be used to authenticate with the redis server.
# Set to true when using Redis in Cluster mode. Mutually exclusive with ha_redis_sentinel_mode_enabled.
;ha_redis_cluster_mode_enabled = false
# Set to true when using Redis in Sentinel mode. Mutually exclusive with ha_redis_cluster_mode_enabled.
;ha_redis_sentinel_mode_enabled = false
# Redis Sentinel master name. Only applicable when ha_redis_sentinel_mode_enabled is set to true.
;ha_redis_sentinel_master_name =
# The username that should be used to authenticate with Redis.
;ha_redis_username =
# The password that should be used to authenticate with the redis server.
# The password that should be used to authenticate with Redis.
;ha_redis_password =
# The redis database, by default it's 0.
# The username that should be used to authenticate with Redis Sentinel.
# Only applicable when ha_redis_sentinel_mode_enabled is set to true.
;ha_redis_sentinel_username =
# The password that should be used to authenticate with Redis Sentinel.
# Only applicable when ha_redis_sentinel_mode_enabled is set to true.
;ha_redis_sentinel_password =
# The Redis database. The default value is 0.
;ha_redis_db =
# A prefix that is used for every key or channel that is created on the redis server
# as part of HA for alerting.
# A prefix that is used for every key or channel that is created on the Redis server as part of HA for alerting.
# Useful if you plan to share Redis with multiple Grafana instances.
;ha_redis_prefix =
# The name of the cluster peer that will be used as identifier. If none is
# provided, a random one will be generated.
# The name of the cluster peer to use as an identifier. If none is provided, a random one is generated.
;ha_redis_peer_name =
# The maximum number of simultaneous redis connections.
# ha_redis_max_conns = 5
# The maximum number of simultaneous Redis connections.
;ha_redis_max_conns = 5
# Enable TLS on the client used to communicate with the redis server. This should be set to true
# Enable TLS on the client used to communicate with the Redis server. This should be set to true
# if using any of the other ha_redis_tls_* fields.
# ha_redis_tls_enabled = false
;ha_redis_tls_enabled = false
# Path to the PEM-encoded TLS client certificate file used to authenticate with the redis server.
# Path to the PEM-encoded TLS client certificate file used to authenticate with the Redis server.
# Required if using Mutual TLS.
# ha_redis_tls_cert_path =
;ha_redis_tls_cert_path =
# Path to the PEM-encoded TLS private key file. Also requires the client certificate to be configured.
# Required if using Mutual TLS.
# ha_redis_tls_key_path =
;ha_redis_tls_key_path =
# Path to the PEM-encoded CA certificates file. If not set, the host's root CA certificates are used.
# ha_redis_tls_ca_path =
;ha_redis_tls_ca_path =
# Overrides the expected name of the redis server certificate.
# ha_redis_tls_server_name =
# Overrides the expected name of the Redis server certificate.
;ha_redis_tls_server_name =
# Skips validating the redis server certificate.
# ha_redis_tls_insecure_skip_verify =
# Skips validating the Redis server certificate.
;ha_redis_tls_insecure_skip_verify =
# Overrides the default TLS cipher suite list.
# ha_redis_tls_cipher_suites =
;ha_redis_tls_cipher_suites =
# Overrides the default minimum TLS version.
# Allowed values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13
# ha_redis_tls_min_version =
;ha_redis_tls_min_version =
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
;ha_listen_address = "0.0.0.0:9094"