From 92016ef68d522f6e922a3875d0bd488c6755f92d Mon Sep 17 00:00:00 2001 From: ArthurSens Date: Fri, 16 Apr 2021 12:54:08 +0000 Subject: [PATCH 1/3] Change message to description Signed-off-by: ArthurSens --- .../kube-prometheus/components/mixin/alerts/general.libsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet b/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet index 16f3e39c..221d8a83 100644 --- a/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet +++ b/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet @@ -7,7 +7,7 @@ { alert: 'TargetDown', annotations: { - message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service }} targets in {{ $labels.namespace }} namespace are down.', + description: '{{ 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', @@ -18,7 +18,7 @@ { alert: 'Watchdog', annotations: { - message: ||| + description: ||| This is an alert meant to ensure that the entire alerting pipeline is functional. This alert is always firing, therefore it should always be firing in Alertmanager and always fire against a receiver. There are integrations with various notification From c96c639ef18c9e4fe8ce232461b96b5313857eb9 Mon Sep 17 00:00:00 2001 From: ArthurSens Date: Fri, 16 Apr 2021 12:54:23 +0000 Subject: [PATCH 2/3] Add summary Signed-off-by: ArthurSens --- .../kube-prometheus/components/mixin/alerts/general.libsonnet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet b/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet index 221d8a83..cd5c7165 100644 --- a/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet +++ b/jsonnet/kube-prometheus/components/mixin/alerts/general.libsonnet @@ -7,6 +7,7 @@ { alert: 'TargetDown', annotations: { + summary: 'One or more targets are unreachable.', description: '{{ 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', @@ -18,6 +19,7 @@ { alert: 'Watchdog', annotations: { + summary: 'An alert that should always be firing to certify that Alertmanager is working properly.', description: ||| This is an alert meant to ensure that the entire alerting pipeline is functional. This alert is always firing, therefore it should always be firing in Alertmanager From 72b742d7e8836d9764e50862bdb8259bbf3708e3 Mon Sep 17 00:00:00 2001 From: ArthurSens Date: Fri, 16 Apr 2021 14:17:26 +0000 Subject: [PATCH 3/3] Regenerate manifests Signed-off-by: ArthurSens --- manifests/kube-prometheus-prometheusRule.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/kube-prometheus-prometheusRule.yaml b/manifests/kube-prometheus-prometheusRule.yaml index 530dc0cd..e3ee47fa 100644 --- a/manifests/kube-prometheus-prometheusRule.yaml +++ b/manifests/kube-prometheus-prometheusRule.yaml @@ -15,21 +15,23 @@ spec: rules: - alert: TargetDown annotations: - message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service }} targets in {{ $labels.namespace }} namespace are down.' + description: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service }} targets in {{ $labels.namespace }} namespace are down.' runbook_url: https://github.com/prometheus-operator/kube-prometheus/wiki/targetdown + summary: One or more targets are unreachable. expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10 for: 10m labels: severity: warning - alert: Watchdog annotations: - message: | + description: | This is an alert meant to ensure that the entire alerting pipeline is functional. This alert is always firing, therefore it should always be firing in Alertmanager and always fire against a receiver. There are integrations with various notification mechanisms that send a notification when this alert is not firing. For example the "DeadMansSnitch" integration in PagerDuty. runbook_url: https://github.com/prometheus-operator/kube-prometheus/wiki/watchdog + summary: An alert that should always be firing to certify that Alertmanager is working properly. expr: vector(1) labels: severity: none