contrib/kube-prometheus: Fix outdated alerts to use message annotation
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
{
|
||||
alert: 'AlertmanagerConfigInconsistent',
|
||||
annotations: {
|
||||
description: 'The configuration of the instances of the Alertmanager cluster `{{$labels.service}}` are out of sync.',
|
||||
summary: 'Configuration out of sync',
|
||||
message: 'The configuration of the instances of the Alertmanager cluster `{{$labels.service}}` are out of sync.',
|
||||
},
|
||||
expr: |||
|
||||
count_values("config_hash", alertmanager_config_hash{%(alertmanagerSelector)s}) BY (service) / ON(service) GROUP_LEFT() label_replace(prometheus_operator_alertmanager_spec_replicas{%(prometheusOperatorSelector)s}, "service", "alertmanager-$1", "alertmanager", "(.*)") != 1
|
||||
@@ -21,8 +20,7 @@
|
||||
{
|
||||
alert: 'AlertmanagerDownOrMissing',
|
||||
annotations: {
|
||||
description: 'An unexpected number of Alertmanagers were scraped or disappeared from discovery.',
|
||||
summary: 'Alertmanager down or missing',
|
||||
message: 'An unexpected number of Alertmanagers were scraped or disappeared from discovery.',
|
||||
},
|
||||
expr: |||
|
||||
label_replace(prometheus_operator_alertmanager_spec_replicas{%(prometheusOperatorSelector)s}, "job", "alertmanager-$1", "alertmanager", "(.*)") / ON(job) GROUP_RIGHT() sum(up{%(alertmanagerSelector)s}) BY (job) != 1
|
||||
@@ -35,8 +33,7 @@
|
||||
{
|
||||
alert: 'AlertmanagerFailedReload',
|
||||
annotations: {
|
||||
description: "Reloading Alertmanager's configuration has failed for {{ $labels.namespace }}/{{ $labels.pod}}.",
|
||||
summary: "Alertmanager's configuration reload failed",
|
||||
message: "Reloading Alertmanager's configuration has failed for {{ $labels.namespace }}/{{ $labels.pod}}.",
|
||||
},
|
||||
expr: |||
|
||||
alertmanager_config_last_reload_successful{%(alertmanagerSelector)s} == 0
|
||||
|
@@ -7,8 +7,7 @@
|
||||
{
|
||||
alert: 'TargetDown',
|
||||
annotations: {
|
||||
description: '{{ $value }}% of the {{ $labels.job }} targets are down.',
|
||||
summary: 'Targets are down',
|
||||
message: '{{ $value }}% of the {{ $labels.job }} targets are down.',
|
||||
},
|
||||
expr: '100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10',
|
||||
'for': '10m',
|
||||
@@ -19,8 +18,7 @@
|
||||
{
|
||||
alert: 'DeadMansSwitch',
|
||||
annotations: {
|
||||
description: 'This is a DeadMansSwitch meant to ensure that the entire alerting pipeline is functional.',
|
||||
summary: 'Alerting DeadMansSwitch',
|
||||
message: 'This is a DeadMansSwitch meant to ensure that the entire alerting pipeline is functional.',
|
||||
},
|
||||
expr: 'vector(1)',
|
||||
labels: {
|
||||
|
Reference in New Issue
Block a user