Skip to content

Commit d6c0815

Browse files
author
Tyler Slaton
committed
fix(prometheus): add summary and description for prometheus alerts
Signed-off-by: Tyler Slaton <[email protected]>
1 parent 404aa2c commit d6c0815

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

deploy/chart/templates/0000_90_olm_01-prometheus-rule.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,24 @@ spec:
1818
severity: warning
1919
namespace: "{{ "{{ $labels.namespace }}" }}"
2020
annotations:
21-
message: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Reason-{{ printf "{{ $labels.reason }}" }}
21+
summary: CSV failed for over 2 minutes
22+
description: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Reason-{{ printf "{{ $labels.reason }}" }}
2223
- alert: CsvAbnormalOver30Min
2324
expr: csv_abnormal{phase=~"(^Replacing$|^Pending$|^Deleting$|^Unknown$)"}
2425
for: 30m
2526
labels:
2627
severity: warning
2728
namespace: "{{ "{{ $labels.namespace }}" }}"
2829
annotations:
29-
message: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Phase-{{ printf "{{ $labels.phase }}" }} Reason-{{ printf "{{ $labels.reason }}" }}
30+
summary: CSV abnormal for over 30 minutes
31+
description: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Phase-{{ printf "{{ $labels.phase }}" }} Reason-{{ printf "{{ $labels.reason }}" }}
3032
- name: olm.installplan.rules
3133
rules:
3234
- alert: InstallPlanStepAppliedWithWarnings
3335
expr: sum(increase(installplan_warnings_total[5m])) > 0
3436
labels:
3537
severity: warning
3638
annotations:
37-
message: The API server returned a warning during installation or upgrade of an operator. An Event with reason "AppliedWithWarnings" has been created with complete details, including a reference to the InstallPlan step that generated the warning.
39+
summary: API returned a warning when modifying an operator
40+
description: The API server returned a warning during installation or upgrade of an operator. An Event with reason "AppliedWithWarnings" has been created with complete details, including a reference to the InstallPlan step that generated the warning.
3841
{{ end }}

pkg/controller/operators/catalog/testdata/prometheusrule.cr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ spec:
1111
rules:
1212
- alert: SeriousAlert
1313
annotations:
14-
message: A serious alert!
14+
summary: Serious Alert!
15+
description: A serious alert!
1516
expr: alert_status{prioirity="Serious"}
1617
labels:
1718
severity: warn

0 commit comments

Comments
 (0)