Skip to content
Snippets Groups Projects
Unverified Commit 2421e8cb authored by Frederic Branczyk's avatar Frederic Branczyk Committed by GitHub
Browse files

Merge pull request #609 from lilic/add-prom-operator-alerts

prometheus-operator.libsonnet: Add PrometheusOperatorWatchErrors alert
parents a87f322e a5b71282
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,19 @@ ...@@ -4,6 +4,19 @@
{ {
name: 'prometheus-operator', name: 'prometheus-operator',
rules: [ rules: [
{
alert: 'PrometheusOperatorWatchErrors',
expr: |||
(sum by (controller,namespace) (rate(prometheus_operator_watch_operations_failed_total{%(prometheusOperatorSelector)s}[1h])) / sum by (controller,namespace) (rate(prometheus_operator_watch_operations_total{%(prometheusOperatorSelector)s}[1h]))) > 0.1
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
message: 'Errors while performing watch operations in controller {{$labels.controller}} in {{$labels.namespace}} namespace.',
},
'for': '15m',
},
{ {
alert: 'PrometheusOperatorReconcileErrors', alert: 'PrometheusOperatorReconcileErrors',
expr: ||| expr: |||
......
...@@ -1793,6 +1793,15 @@ spec: ...@@ -1793,6 +1793,15 @@ spec:
severity: warning severity: warning
- name: prometheus-operator - name: prometheus-operator
rules: rules:
- alert: PrometheusOperatorWatchErrors
annotations:
message: Errors while performing watch operations in controller {{$labels.controller}}
in {{$labels.namespace}} namespace.
expr: |
(sum by (controller,namespace) (rate(prometheus_operator_watch_operations_failed_total{job="prometheus-operator",namespace="monitoring"}[1h])) / sum by (controller,namespace) (rate(prometheus_operator_watch_operations_total{job="prometheus-operator",namespace="monitoring"}[1h]))) > 0.1
for: 15m
labels:
severity: warning
- alert: PrometheusOperatorReconcileErrors - alert: PrometheusOperatorReconcileErrors
annotations: annotations:
message: Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace message: Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment