Skip to content

Commit

Permalink
fixup post review
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Oct 7, 2024
1 parent b44c9e1 commit 1654751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion monitoring/mongodb/alerts.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,16 @@ tests:
values: 1x10
- series: mongodb_rs_members_state{namespace="zenko", pod="data-db-mongodb-sharded-shard0-data-2", member_state="SECONDARY", rs_nm="data-db-mongodb-sharded-shard-0", rs_state="1"}
values: 2x10
- series: mongodb_rs_members_state{namespace="zenko", pod="data-db-mongodb-sharded-shard0-data-2", member_state="SECONDARY", rs_nm="data-db-mongodb-sharded-shard-0", rs_state="1"}
values: 2x10

alert_rule_test:
- alertname: MongoDbRSNotSynced
eval_time: 10m
exp_alerts:
- exp_labels:
severity: warning
rs_nm: data-db-mongodb-sharded-shard-0
pod: data-db-mongodb-sharded-shard0-data-2
exp_annotations:
description: "MongoDB replica set `data-db-mongodb-sharded-shard-0` is not in the expected state. It currently has `1` SECONDARY members instead of the expected number. Please ensure that all instances are running properly."
summary: MongoDB replica set out of sync
2 changes: 1 addition & 1 deletion monitoring/mongodb/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ groups:

- alert: MongoDbRSNotSynced
expr: |
count by (rs_nm) (mongodb_rs_members_state{namespace="${namespace}", pod=~"${service}.*", member_state="SECONDARY", rs_state="1"}) != (${replicas} - 1)
count by (pod) (mongodb_rs_members_state{namespace="${namespace}", pod=~"${service}.*", member_state="SECONDARY", rs_state="1"}) != (${replicas} - 1)
for: 10m
labels:
severity: warning
Expand Down

0 comments on commit 1654751

Please sign in to comment.