Skip to content

Commit

Permalink
post review fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Sep 6, 2024
1 parent 92ba78e commit 8dbdfc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions monitoring/mongodb/alerts.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ tests:

alert_rule_test:
- alertname: MongoDbInvalidState
eval_time: 1m
eval_time: 5m
exp_alerts:
- exp_labels:
namespace: zenko
Expand Down Expand Up @@ -324,8 +324,8 @@ tests:
- name: MongoDbNodeNotSynced
interval: 1m
input_series:
- series: mongodb_mongod_replset_number_of_members{set="data-db-mongodb-sharded-shard-0", pod="mongodb-1"}
values: 1+0x9
- series: mongodb_rs_members_state{namespace="zenko", pod="data-db-mongodb-sharded-mongos-0", rs_state="SECONDARY"}
values: 2+0x9

alert_rule_test:
- alertname: MongoDbNodeNotSynced
Expand Down
4 changes: 2 additions & 2 deletions monitoring/mongodb/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ groups:
- alert: MongoDbInvalidState
expr: |
avg_over_time(mongodb_rs_members_state{namespace="${namespace}", pod=~"${service}.*", rs_state=~"6|8|10"}[1m]) > 0
for: 1m
for: 5m
labels:
severity: critical
annotations:
Expand All @@ -173,7 +173,7 @@ groups:

- alert: MongoDbNodeNotSynced
expr: |
sum by (pod) (mongodb_mongod_replset_number_of_members{set="data-db-mongodb-sharded-shard-0"}) != ${replicas}
sum by (pod) (mongodb_rs_members_state{namespace="${namespace}", pod=~"${service}.*", member_state="SECONDARY"}) != (${replicas} - 1)
for: 1m
labels:
severity: critical
Expand Down

0 comments on commit 8dbdfc3

Please sign in to comment.