feat: improve rule for used connection on redis (#358)

use max allowed connections value instead of a fixed value
This commit is contained in:
Roman Pertl 2023-06-27 00:27:20 +02:00 committed by GitHub
parent 7a05f925b4
commit 71f488d744
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,13 +86,13 @@ groups:
description: "Redis is running out of configured maxmemory (> 90%)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" description: "Redis is running out of configured maxmemory (> 90%)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: RedisTooManyConnections - alert: RedisTooManyConnections
expr: 'redis_connected_clients > 100' expr: 'redis_connected_clients / redis_config_maxclients * 100 > 90'
for: 2m for: 2m
labels: labels:
severity: warning severity: warning
annotations: annotations:
summary: Redis too many connections (instance {{ $labels.instance }}) 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 - alert: RedisNotEnoughConnections
expr: 'redis_connected_clients < 5' expr: 'redis_connected_clients < 5'