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
+30 -18
View File
@@ -1288,39 +1288,51 @@ 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.
# 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
# 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 =
@@ -1331,10 +1343,10 @@ 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 =
# Overrides the expected name of the redis server certificate.
# Overrides the expected name of the Redis server certificate.
ha_redis_tls_server_name =
# Skips validating the redis server certificate.
# Skips validating the Redis server certificate.
ha_redis_tls_insecure_skip_verify =
# Overrides the default TLS cipher suite list.