From e6529d950f5be71da61854ff4e5a1779b60fddaa Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Mon, 22 Jun 2020 17:17:10 +0200 Subject: [PATCH] manifests: regenerate --- manifests/prometheus-rules.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/manifests/prometheus-rules.yaml b/manifests/prometheus-rules.yaml index 84bb6426..fe6f7b04 100644 --- a/manifests/prometheus-rules.yaml +++ b/manifests/prometheus-rules.yaml @@ -1140,10 +1140,13 @@ spec: rules: - alert: AlertmanagerConfigInconsistent annotations: - message: The configuration of the instances of the Alertmanager cluster `{{$labels.service}}` - are out of sync. + message: | + The configuration of the instances of the Alertmanager cluster `{{ $labels.namespace }}/{{ $labels.service }}` are out of sync. + {{ range printf "alertmanager_config_hash{namespace=\"%s\",service=\"%s\"}" $labels.namespace $labels.service | query }} + Configuration hash for pod {{ .Labels.pod }} is "{{ printf "%.f" .Value }}" + {{ end }} expr: | - count_values("config_hash", alertmanager_config_hash{job="alertmanager-main",namespace="monitoring"}) BY (service) / ON(service) GROUP_LEFT() label_replace(max(prometheus_operator_spec_replicas{job="prometheus-operator",namespace="monitoring",controller="alertmanager"}) by (name, job, namespace, controller), "service", "alertmanager-$1", "name", "(.*)") != 1 + count by(namespace,service) (count_values by(namespace,service) ("config_hash", alertmanager_config_hash{job="alertmanager-main",namespace="monitoring"})) != 1 for: 5m labels: severity: critical