contrib/kube-prometheus: Create missing Prometheus operator alerts

This commit is contained in:
Matthias Loibl
2018-09-13 14:43:46 +02:00
parent abc899135e
commit 8d38e81521
2 changed files with 52 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
(import 'alertmanager.libsonnet') +
(import 'general.libsonnet') +
(import 'node.libsonnet') +
(import 'prometheus.libsonnet')
(import 'prometheus.libsonnet') +
(import 'prometheus-operator.libsonnet')

View File

@@ -0,0 +1,50 @@
{
prometheusAlerts+:: {
groups+: [
{
name: 'prometheus-operator',
rules: [
{
alert: 'PrometheusOperatorAlertmanagerReconcileErrors',
expr: |||
rate(prometheus_operator_alertmanager_reconcile_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.01
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
message: 'Errors while reconciling Alertmanager in {{$labels.namespace}} namespace.',
},
'for': '10m',
},
{
alert: 'PrometheusOperatorPrometheusReconcileErrors',
expr: |||
rate(prometheus_operator_prometheus_reconcile_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.01
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
message: 'Errors while reconciling Prometheus in {{$labels.namespace}} namespace.',
},
'for': '10m',
},
{
alert: 'PrometheusOperatorNodeLookupErrors',
expr: |||
rate(prometheus_operator_node_address_lookup_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.01
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
message: 'Errors while reconciling Prometheus in {{$labels.namespace}} namespace.',
},
'for': '10m',
},
],
},
],
},
}