forked from prometheus-operator/prometheus-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request prometheus-operator#3333 from paulfantom/mixin
- Loading branch information
Showing
6 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
groups: | ||
- name: prometheus-operator | ||
rules: | ||
- alert: PrometheusOperatorWatchErrors | ||
annotations: | ||
description: Errors while performing watch operations in controller {{$labels.controller}} | ||
in {{$labels.namespace}} namespace. | ||
summary: Errors while performing watch operations in controller. | ||
expr: | | ||
(sum by (controller,namespace) (rate(prometheus_operator_watch_operations_failed_total{job="prometheus-operator"}[1h])) / sum by (controller,namespace) (rate(prometheus_operator_watch_operations_total{job="prometheus-operator"}[1h]))) > 0.1 | ||
for: 15m | ||
labels: | ||
severity: warning | ||
- alert: PrometheusOperatorReconcileErrors | ||
annotations: | ||
description: Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace | ||
}} Namespace. | ||
summary: Errors while reconciling controller. | ||
expr: | | ||
rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m]) > 0.1 | ||
for: 10m | ||
labels: | ||
severity: warning | ||
- alert: PrometheusOperatorNodeLookupErrors | ||
annotations: | ||
description: Errors while reconciling Prometheus in {{ $labels.namespace }} | ||
Namespace. | ||
summary: Errors while reconciling Prometheus. | ||
expr: | | ||
rate(prometheus_operator_node_address_lookup_errors_total{job="prometheus-operator"}[5m]) > 0.1 | ||
for: 10m | ||
labels: | ||
severity: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
( | ||
import 'mixin.libsonnet' | ||
).prometheusAlerts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
prometheusAlerts+:: { | ||
groups+: [ | ||
{ | ||
name: 'prometheus-operator', | ||
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: { | ||
description: 'Errors while performing watch operations in controller {{$labels.controller}} in {{$labels.namespace}} namespace.', | ||
summary: 'Errors while performing watch operations in controller.', | ||
}, | ||
'for': '15m', | ||
}, | ||
{ | ||
alert: 'PrometheusOperatorReconcileErrors', | ||
expr: ||| | ||
rate(prometheus_operator_reconcile_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.1 | ||
||| % $._config, | ||
labels: { | ||
severity: 'warning', | ||
}, | ||
annotations: { | ||
description: 'Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace }} Namespace.', | ||
summary: 'Errors while reconciling controller.', | ||
}, | ||
'for': '10m', | ||
}, | ||
{ | ||
alert: 'PrometheusOperatorNodeLookupErrors', | ||
expr: ||| | ||
rate(prometheus_operator_node_address_lookup_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.1 | ||
||| % $._config, | ||
labels: { | ||
severity: 'warning', | ||
}, | ||
annotations: { | ||
description: 'Errors while reconciling Prometheus in {{ $labels.namespace }} Namespace.', | ||
summary: 'Errors while reconciling Prometheus.', | ||
}, | ||
'for': '10m', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
_config+:: { | ||
prometheusOperatorSelector: 'job="prometheus-operator"', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(import 'config.libsonnet') + | ||
(import 'alerts/alerts.libsonnet') |