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

refactor: Fix alert rules for failed collector. #121

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
12 changes: 6 additions & 6 deletions tests/unit/test_alert_rules/test_general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ evaluation_interval: 1m
tests:
- interval: 1m
input_series:
- series: ipmidcmicollector_collector_failed{instance="ubuntu-99", collector="IPMIDCMICollector"}
- series: ipmidcmi_collector_failed{instance="ubuntu-99", collector="ipmidcmi"}
values: '1x15'
- series: ipmiselcollector_collector_failed{instance="ubuntu-99", collector="IPMISELCollector"}
- series: ipmisel_collector_failed{instance="ubuntu-99", collector="ipmisel"}
values: '1x15'

alert_rule_test:
Expand All @@ -18,18 +18,18 @@ tests:
- exp_labels:
severity: error
instance: ubuntu-99
collector: IPMIDCMICollector
collector: ipmidcmi
exp_annotations:
summary: Collector failed. (instance ubuntu-99)
description: |
A collector failed to fetch the metrics. Please reach out to hardware-observer maintainers.
LABELS = map[__name__:ipmidcmicollector_collector_failed collector:IPMIDCMICollector instance:ubuntu-99]
LABELS = map[__name__:ipmidcmi_collector_failed collector:ipmidcmi instance:ubuntu-99]
- exp_labels:
severity: error
instance: ubuntu-99
collector: IPMISELCollector
collector: ipmisel
exp_annotations:
summary: Collector failed. (instance ubuntu-99)
description: |
A collector failed to fetch the metrics. Please reach out to hardware-observer maintainers.
LABELS = map[__name__:ipmiselcollector_collector_failed collector:IPMISELCollector instance:ubuntu-99]
LABELS = map[__name__:ipmisel_collector_failed collector:ipmisel instance:ubuntu-99]