RedisDisconnectedSlaves #
Redis not replicating for all slaves. Consider reviewing the redis replication status.
Alert Rule
alert: RedisDisconnectedSlaves
annotations:
description: |-
Redis not replicating for all slaves. Consider reviewing the redis replication status.
VALUE = {{ $value }}
LABELS = {{ $labels }}
runbook: https://srerun.github.io/prometheus-alerts/runbooks/oliver006-redis-exporter/redisdisconnectedslaves/
summary: Redis disconnected slaves (instance {{ $labels.instance }})
expr: count without (instance, job) (redis_connected_slaves) - sum without (instance,
job) (redis_connected_slaves) - 1 > 0
for: 0m
labels:
severity: critical
Here is a runbook for the Prometheus alert rule RedisDisconnectedSlaves
:
Meaning #
The RedisDisconnectedSlaves
alert indicates that one or more Redis slaves are disconnected from their master. This means that data replication is not occurring, and the slaves are no longer receiving updates from the master. This can lead to data inconsistencies and potential data loss if not addressed promptly.
Impact #
The impact of this alert is critical, as it can result in:
- Data inconsistencies between the master and slaves
- Potential data loss if the master fails and the slaves are not updated
- Inconsistent application behavior, as the slaves may not reflect the latest data changes
- Increased risk of data corruption or loss in the event of a failover
Diagnosis #
To diagnose the issue, follow these steps:
- Check the Redis replication status using the
redis-cli
command or a Redis GUI tool - Verify that the Redis master is properly configured and running
- Check the network connectivity between the Redis master and slaves
- Review the Redis logs for any error messages related to replication
- Check the
redis_connected_slaves
metric in Prometheus to identify which slaves are disconnected
Mitigation #
To mitigate the issue, follow these steps:
- Immediately investigate and resolve any network connectivity issues between the Redis master and slaves
- Verify that the Redis master and slaves are properly configured and running
- Restart the Redis slaves to re-establish replication
- Monitor the Redis replication status and metrics to ensure that the issue is resolved
- Consider setting up additional monitoring and alerting for Redis replication status to prevent similar issues in the future