Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make alerting rules resilient to scrape failures #3018

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions deploy/chart/templates/0000_90_olm_01-prometheus-rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,21 @@ spec:
- name: olm.csv_abnormal.rules
rules:
- alert: CsvAbnormalFailedOver2Min
expr: csv_abnormal{phase=~"^Failed$"}
expr: last_over_time(csv_abnormal{phase="Failed"}[5m]}
for: 2m
labels:
severity: warning
namespace: "{{ "{{ $labels.namespace }}" }}"
annotations:
summary: CSV failed for over 2 minutes
description: Fires whenever a CSV has been in the failed phase for more than 2 minutes.
message: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Reason-{{ printf "{{ $labels.reason }}" }}
description: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Reason-{{ printf "{{ $labels.reason }}" }}
- alert: CsvAbnormalOver30Min
expr: csv_abnormal{phase=~"(^Replacing$|^Pending$|^Deleting$|^Unknown$)"}
expr: last_over_time(csv_abnormal{phase=~"(Replacing|Pending|Deleting|Unknown)"}[5m])
for: 30m
labels:
severity: warning
namespace: "{{ "{{ $labels.namespace }}" }}"
annotations:
summary: CSV abnormal for over 30 minutes
description: Fires whenever a CSV is in the Replacing, Pending, Deleting, or Unknown phase for more than 30 minutes.
message: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Phase-{{ printf "{{ $labels.phase }}" }} Reason-{{ printf "{{ $labels.reason }}" }}
description: Failed to install Operator {{ printf "{{ $labels.name }}" }} version {{ printf "{{ $labels.version }}" }}. Phase-{{ printf "{{ $labels.phase }}" }} Reason-{{ printf "{{ $labels.reason }}" }}
- name: olm.installplan.rules
rules:
- alert: InstallPlanStepAppliedWithWarnings
Expand All @@ -39,6 +35,5 @@ spec:
severity: warning
annotations:
summary: API returned a warning when modifying an operator
description: Fires whenever the API server returns a warning when attempting to modify an operator.
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.
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.
{{ end }}
Loading