Skip to content

Commit

Permalink
add tests for rules
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson committed Nov 12, 2024
1 parent 1d2797a commit 7837d81
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ spec:
severity: page
team: atlas
topic: observability
- name: mimir.continuous-test
rules:
- alert: MimirContinuousTestFailingOnWrites
annotations:
dashboard: bdxh7hszfgmbkc/mimir-continous-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,65 @@ tests:
eval_time: 205m
- alertname: MimirCompactorFailedCompaction
eval_time: 350m

# Test for MimirContinuousTestFailingOnWrites alert
- interval: 1m
input_series:
# Test: none, rate > 0, rate = 0
- series: 'mimir_continuous_test_writes_failed_total{cluster_id="golem", installation="golem", namespace="mimir", pipeline="testing", provider="capa"}'
values: "_x20 1+1x80 0+0x70"
alert_rule_test:
- alertname: MimirContinuousTestFailingOnWrites
eval_time: 40m
- alertname: MimirContinuousTestFailingOnWrites
eval_time: 95m
exp_alerts:
- exp_labels:
area: platform
cancel_if_outside_working_hours: "true"
cancel_if_cluster_status_creating: "true"
cancel_if_cluster_status_deleting: "true"
cancel_if_cluster_status_updating: "true"
cluster_id: golem
installation: golem
namespace: mimir
severity: page
team: atlas
topic: observability
exp_annotations:
dashboard: bdxh7hszfgmbkc/mimir-continous-test
description: "Mimir continous-test detected errors in the write path."
opsrecipe: "mimir/"
- alertname: MimirContinuousTestFailingOnWrites
eval_time: 160m

# Test for MimirContinuousTestFailingOnReads alert
- interval: 1m
input_series:
# Test: none, rate > 0, rate = 0
- series: 'mimir_continuous_test_queries_failed_total{cluster_id="golem", installation="golem", namespace="mimir", pipeline="testing", provider="capa"}'
values: "_x20 1+1x80 0+0x70"
alert_rule_test:
- alertname: MimirContinuousTestFailingOnReads
eval_time: 40m
- alertname: MimirContinuousTestFailingOnReads
eval_time: 95m
exp_alerts:
- exp_labels:
area: platform
cancel_if_outside_working_hours: "true"
cancel_if_cluster_status_creating: "true"
cancel_if_cluster_status_deleting: "true"
cancel_if_cluster_status_updating: "true"
cluster_id: golem
installation: golem
namespace: mimir
severity: page
team: atlas
topic: observability
exp_annotations:
dashboard: bdxh7hszfgmbkc/mimir-continous-test
description: "Mimir continous-test detected errors in the write path."
opsrecipe: "mimir/"
- alertname: MimirContinuousTestFailingOnReads
eval_time: 160m

0 comments on commit 7837d81

Please sign in to comment.