-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add prometheus rule for firing an alert when csv_abnormal metric is emitted with phase=failed - Alert message contains name and version of operator.
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
deploy/chart/templates/0000_90_olm_01-prometheus-rule.yaml
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,20 @@ | ||
{{ if and .Values.installType (eq .Values.installType "ocp") }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: olm-alert-rules | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
prometheus: alert-rules | ||
role: alert-rules | ||
spec: | ||
groups: | ||
- name: olm.failing_operators.rules | ||
rules: | ||
- alert: FailingOperator | ||
annotations: | ||
message: Failed to install Operator {{ $labels.name }} version {{ $labels.version }}. Reason-{{ $labels.reason }} | ||
expr: csv_abnormal{phase="Failed"} | ||
labels: | ||
severity: info | ||
{{ end }} |
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,19 @@ | ||
|
||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: olm-alert-rules | ||
namespace: openshift-operator-lifecycle-manager | ||
labels: | ||
prometheus: alert-rules | ||
role: alert-rules | ||
spec: | ||
groups: | ||
- name: olm.failing_operators.rules | ||
rules: | ||
- alert: FailingOperator | ||
annotations: | ||
message: Failed to install Operator {{ $labels.name }} version {{ $labels.version }}. Reason-{{ $labels.reason }} | ||
expr: csv_abnormal{phase="Failed"} | ||
labels: | ||
severity: info |