contrib/kube-prometheus: Create missing Prometheus operator alerts
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
(import 'alertmanager.libsonnet') +
|
(import 'alertmanager.libsonnet') +
|
||||||
(import 'general.libsonnet') +
|
(import 'general.libsonnet') +
|
||||||
(import 'node.libsonnet') +
|
(import 'node.libsonnet') +
|
||||||
(import 'prometheus.libsonnet')
|
(import 'prometheus.libsonnet') +
|
||||||
|
(import 'prometheus-operator.libsonnet')
|
||||||
|
50
jsonnet/kube-prometheus/alerts/prometheus-operator.libsonnet
Normal file
50
jsonnet/kube-prometheus/alerts/prometheus-operator.libsonnet
Normal 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',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
Reference in New Issue
Block a user