contrib/kube-prometheus: Fix AlertmanagerConfigInconsistent alert expression

This commit is contained in:
Matthias Loibl
2018-10-12 14:30:33 +02:00
parent e2476ce2ef
commit e1ed50158b

View File

@@ -10,7 +10,7 @@
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.service}}` are out of sync.',
}, },
expr: ||| expr: |||
count_values("config_hash", alertmanager_config_hash{%(alertmanagerSelector)s}) BY (service) / ON(service) GROUP_LEFT() label_replace(prometheus_operator_spec_replicas{%(prometheusOperatorSelector)s}, "service", "alertmanager-$1", "alertmanager", "(.*)") != 1 count_values("config_hash", alertmanager_config_hash{%(alertmanagerSelector)s}) BY (service) / ON(service) GROUP_LEFT() label_replace(prometheus_operator_spec_replicas{%(prometheusOperatorSelector)s,controller="alertmanager"}, "service", "alertmanager-$1", "name", "(.*)") != 1
||| % $._config, ||| % $._config,
'for': '5m', 'for': '5m',
labels: { labels: {