Skip to content
Snippets Groups Projects
Commit 5743540f authored by Lili Cosic's avatar Lili Cosic
Browse files

prometheus-operator.libsonnet: Add List error alert and fix threshold to

Watch error alert
parent 1917a572
No related branches found
No related tags found
No related merge requests found
...@@ -4,16 +4,29 @@ ...@@ -4,16 +4,29 @@
{ {
name: 'prometheus-operator', name: 'prometheus-operator',
rules: [ rules: [
{
alert: 'PrometheusOperatorListErrors',
expr: |||
(sum by (controller,namespace) (rate(prometheus_operator_list_operations_failed_total{%(prometheusOperatorSelector)s}[1h])) / sum by (controller,namespace) (rate(prometheus_operator_list_operations_total{%(prometheusOperatorSelector)s}[1h]))) > 0.4
||| % $._config,
labels: {
severity: 'warning',
},
annotations: {
message: 'Errors while performing List operations in controller {{$labels.controller}} in {{$labels.namespace}} namespace.',
},
'for': '15m',
},
{ {
alert: 'PrometheusOperatorWatchErrors', alert: 'PrometheusOperatorWatchErrors',
expr: ||| 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 (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.4
||| % $._config, ||| % $._config,
labels: { labels: {
severity: 'warning', severity: 'warning',
}, },
annotations: { annotations: {
message: 'Errors while performing watch operations in controller {{$labels.controller}} in {{$labels.namespace}} namespace.', message: 'Errors while performing Watch operations in controller {{$labels.controller}} in {{$labels.namespace}} namespace.',
}, },
'for': '15m', 'for': '15m',
}, },
......
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