From e6ed60548397627bf10f561f9438201dbba0a36e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 21 Apr 2024 02:15:42 +0300 Subject: 2024-04-21 --- modules/monitoring/rules/redis.yaml | 98 +++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 modules/monitoring/rules/redis.yaml (limited to 'modules/monitoring/rules/redis.yaml') diff --git a/modules/monitoring/rules/redis.yaml b/modules/monitoring/rules/redis.yaml new file mode 100644 index 0000000..b47c313 --- /dev/null +++ b/modules/monitoring/rules/redis.yaml @@ -0,0 +1,98 @@ +--- +groups: + - name: Redis + + rules: + - alert: RedisDown + expr: >- + redis_up == 0 + for: 0m + labels: + severity: critical + annotations: + summary: Redis down at {{ $labels.instance }}. + description: |- + Redis instance is down. + + VALUE = {{ $value }} + LABELS = {{ $labels }} + + - alert: RedisOutOfSystemMemory + expr: >- + redis_memory_used_bytes + / + redis_total_system_memory_bytes * 100 + > 90 + for: 2m + labels: + severity: warning + annotations: + summary: Redis out of system memory at {{ $labels.instance }}. + description: |- + Redis is running out of system memory. + + VALUE = {{ $value }} + LABELS = {{ $labels }} + + - alert: RedisOutOfConfiguredMaxmemory + expr: >- + redis_memory_max_bytes != 0 + and + ( + redis_memory_used_bytes + / + redis_memory_max_bytes * 100 + > 90 + ) + for: 2m + labels: + severity: warning + annotations: + summary: Redis out of configured maxmemory at {{ $labels.instance }}. + description: |- + Redis is running out of configured maxmemory. + + VALUE = {{ $value }} + LABELS = {{ $labels }} + + - alert: RedisTooManyConnections + expr: >- + redis_connected_clients > 100 + for: 2m + labels: + severity: warning + annotations: + summary: Redis too many connections at {{ $labels.instance }}. + description: |- + Redis instance has too many connections. + + VALUE = {{ $value }} + LABELS = {{ $labels }} + + - alert: RedisNotEnoughConnections + expr: >- + redis_connected_clients < 1 + for: 2m + labels: + severity: warning + annotations: + summary: Redis not enough connections at {{ $labels.instance }}. + description: |- + Redis instance should have more connections. + + VALUE = {{ $value }} + LABELS = {{ $labels }} + + - alert: RedisRejectedConnections + expr: >- + increase(redis_rejected_connections_total[1m]) > 0 + for: 0m + labels: + severity: critical + annotations: + summary: Redis rejected connections at {{ $labels.instance }}. + description: |- + Some connections to Redis have been rejected. + + VALUE = {{ $value }} + LABELS = {{ $labels }} -- cgit 1.4.1