From 27e0a4c9a2ba54f56bbfb6896e19becf212caa17 Mon Sep 17 00:00:00 2001 From: Jason Tarasovic Date: Thu, 30 Jan 2020 07:31:23 -0600 Subject: [PATCH 1/2] jsonnet/kube-prometheus/alerts: included service in TargetDown message --- jsonnet/kube-prometheus/alerts/general.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsonnet/kube-prometheus/alerts/general.libsonnet b/jsonnet/kube-prometheus/alerts/general.libsonnet index 441ec777..16f3e39c 100644 --- a/jsonnet/kube-prometheus/alerts/general.libsonnet +++ b/jsonnet/kube-prometheus/alerts/general.libsonnet @@ -7,7 +7,7 @@ { alert: 'TargetDown', annotations: { - message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets in {{ $labels.namespace }} namespace are down.', + message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service }} targets in {{ $labels.namespace }} namespace are down.', }, expr: '100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10', 'for': '10m', From 0b66cd33bd4d434112b6bcd8ca65f37e84a5854a Mon Sep 17 00:00:00 2001 From: Jason Tarasovic Date: Thu, 30 Jan 2020 07:33:14 -0600 Subject: [PATCH 2/2] manifests/prometheus-rules.yaml: regenerated file --- manifests/prometheus-rules.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/prometheus-rules.yaml b/manifests/prometheus-rules.yaml index 422893cb..29cbdf3c 100644 --- a/manifests/prometheus-rules.yaml +++ b/manifests/prometheus-rules.yaml @@ -1329,8 +1329,8 @@ spec: rules: - alert: TargetDown annotations: - message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets in - {{ $labels.namespace }} namespace are down.' + message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service + }} targets in {{ $labels.namespace }} namespace are down.' expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10 for: 10m