From 52b0300068f787709dc15a0c1dd50e0e3b9f2159 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 19 Sep 2022 00:39:24 +0200 Subject: [PATCH] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dde51db..459d351 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,8 @@ for example about OOM events… ``` groups: - name: host_health - - alert: oom - expr: rate(docker_events{event="oom",kubernetes_namespace="inf"}[1m]) > 0 - labels: - routing: slackonly + - alert: Container (Swarm) died/is dying with exit code other than 0 + expr: max by (status, container_attributes_com_docker_swarm_service_name, container_attributes_exitcode) (max_over_time(docker_events_container_total{status=~"die|.*oom.*|.*kill.*", container_attributes_exitcode != "0", container_attributes_exitcode != "" }[15m])) > 0 annotations: - link: '{{ $labels.event }} - {{ $labels.env }} - {{ $labels.pod }}' + summary: "Bad Exit code \"{{ $labels.container_attributes_exitcode }}\" for status \"{{ $labels.status }}\" for service \"{{ $labels.container_attributes_com_docker_swarm_service_name }}\"" ```