From 71f488d7448c0cfcf8d94a292b49ac1abca02aac Mon Sep 17 00:00:00 2001 From: Roman Pertl <533172+roock@users.noreply.github.com> Date: Tue, 27 Jun 2023 00:27:20 +0200 Subject: [PATCH] feat: improve rule for used connection on redis (#358) use max allowed connections value instead of a fixed value --- dist/rules/redis/oliver006-redis-exporter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/rules/redis/oliver006-redis-exporter.yml b/dist/rules/redis/oliver006-redis-exporter.yml index 7109972..6afd17b 100644 --- a/dist/rules/redis/oliver006-redis-exporter.yml +++ b/dist/rules/redis/oliver006-redis-exporter.yml @@ -86,13 +86,13 @@ groups: description: "Redis is running out of configured maxmemory (> 90%)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - alert: RedisTooManyConnections - expr: 'redis_connected_clients > 100' + expr: 'redis_connected_clients / redis_config_maxclients * 100 > 90' for: 2m labels: severity: warning annotations: summary: Redis too many connections (instance {{ $labels.instance }}) - description: "Redis instance has too many connections\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + description: "Redis is running out of connections (> 90% used)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - alert: RedisNotEnoughConnections expr: 'redis_connected_clients < 5'