Commit 6815998a authored by S M Y's avatar S M Y
Browse files

Adding alertrule to detect uneven replicas

Showing with 8 additions and 0 deletions
+8 -0
......@@ -14,3 +14,11 @@ groups:
annotations:
description: '{% raw %}{{ $labels.container_label_com_docker_swarm_task_name }}{% endraw %} is using {% raw %}{{ $value }}{% endraw %}% memory. Threshold is : {{ container_memory_usage_percentage_theshold }} %'
summary: 'HIGH MEMORY USAGE WARNING: TASK {% raw %}{{ $labels.container_label_com_docker_swarm_task_name }}{% endraw %} on {% raw %}{{ $labels.instance }}{% endraw %}'
- alert: replicas_uneven
expr: sum by (service_name) (docker_service_replicas_expected != docker_service_replicas_running)
for: 1m
annotations:
description: 'UNEVEN REPLICAS COUNT FOR {% raw %}{{ $labels.service_name }}{% endraw %}'
summary: 'UNEVEN REPLICAS COUNT: {% raw %}{{ $labels.service_name }}{% endraw %} is having uneven count'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment