mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 14:39:40 -08:00
Merge pull request #8254 from prometheus/beorn7/mixin
mixin: Add a capability to exclude non-prod AM instances
This commit is contained in:
commit
404b2980cf
|
@ -267,9 +267,9 @@
|
||||||
alert: 'PrometheusErrorSendingAlertsToAnyAlertmanager',
|
alert: 'PrometheusErrorSendingAlertsToAnyAlertmanager',
|
||||||
expr: |||
|
expr: |||
|
||||||
min without (alertmanager) (
|
min without (alertmanager) (
|
||||||
rate(prometheus_notifications_errors_total{%(prometheusSelector)s}[5m])
|
rate(prometheus_notifications_errors_total{%(prometheusSelector)s,alertmanager!~`%(nonNotifyingAlertmanagerRegEx)s`}[5m])
|
||||||
/
|
/
|
||||||
rate(prometheus_notifications_sent_total{%(prometheusSelector)s}[5m])
|
rate(prometheus_notifications_sent_total{%(prometheusSelector)s,alertmanager!~`%(nonNotifyingAlertmanagerRegEx)s`}[5m])
|
||||||
)
|
)
|
||||||
* 100
|
* 100
|
||||||
> 3
|
> 3
|
||||||
|
@ -289,9 +289,9 @@
|
||||||
alert: 'PrometheusErrorSendingAlertsToAnyAlertmanager',
|
alert: 'PrometheusErrorSendingAlertsToAnyAlertmanager',
|
||||||
expr: |||
|
expr: |||
|
||||||
min by (%(prometheusHAGroupLabels)s) (
|
min by (%(prometheusHAGroupLabels)s) (
|
||||||
rate(prometheus_notifications_errors_total{%(prometheusSelector)s}[5m])
|
rate(prometheus_notifications_errors_total{%(prometheusSelector)s,alertmanager!~`%(nonNotifyingAlertmanagerRegEx)s`}[5m])
|
||||||
/
|
/
|
||||||
rate(prometheus_notifications_sent_total{%(prometheusSelector)s}[5m])
|
rate(prometheus_notifications_sent_total{%(prometheusSelector)s,alertmanager!~`%(nonNotifyingAlertmanagerRegEx)s`}[5m])
|
||||||
)
|
)
|
||||||
* 100
|
* 100
|
||||||
> 3
|
> 3
|
||||||
|
|
|
@ -27,5 +27,15 @@
|
||||||
// HA group. All labels used here must also be present in
|
// HA group. All labels used here must also be present in
|
||||||
// prometheusHAGroupLabels above.
|
// prometheusHAGroupLabels above.
|
||||||
prometheusHAGroupName: '{{$labels.job}}',
|
prometheusHAGroupName: '{{$labels.job}}',
|
||||||
|
|
||||||
|
// nonNotifyingAlertmanagerRegEx can be used to mark Alertmanager
|
||||||
|
// instances that are not part of the Alertmanager cluster
|
||||||
|
// delivering production notifications. This is important for the
|
||||||
|
// PrometheusErrorSendingAlertsToAnyAlertmanager alert. Otherwise,
|
||||||
|
// a still working test or auditing instance could mask a full
|
||||||
|
// failure of all the production instances. The provided regular
|
||||||
|
// expression is matched against the `alertmanager` label.
|
||||||
|
// Example: @'http://test-alertmanager\..*'
|
||||||
|
nonNotifyingAlertmanagerRegEx: @'',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue