diff --git a/monitoring/mongodb/alerts.test.yaml b/monitoring/mongodb/alerts.test.yaml index c6d3bf337..ea6604184 100644 --- a/monitoring/mongodb/alerts.test.yaml +++ b/monitoring/mongodb/alerts.test.yaml @@ -360,5 +360,5 @@ tests: severity: warning rs_nm: data-db-mongodb-sharded-shard-0 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." + description: "MongoDB replica set `data-db-mongodb-sharded-shard-0` is not in the expected state. Please ensure that all instances are running properly." summary: MongoDB replica set out of sync diff --git a/monitoring/mongodb/alerts.yaml b/monitoring/mongodb/alerts.yaml index f5acde22f..3f0c6f3a2 100644 --- a/monitoring/mongodb/alerts.yaml +++ b/monitoring/mongodb/alerts.yaml @@ -183,10 +183,10 @@ groups: - alert: MongoDbRSNotSynced expr: | - floor(avg by(rs_nm)(count by (rs_nm, pod)(mongodb_rs_members_state{namespace="${namespace}", pod=~"${service}.*", member_state="SECONDARY"}))) != (${replicas} - 1) + group by(rs_nm)(count by (rs_nm, pod)(mongodb_rs_members_state{namespace="${namespace}", pod=~"${service}.*", member_state="SECONDARY"})) != (${replicas} - 1) ) for: 10m labels: severity: warning annotations: - description: "MongoDB replica set `{{ $labels.rs_nm }}` is not in the expected state. It currently has `{{ $value }}` SECONDARY members instead of the expected number. Please ensure that all instances are running properly." + description: "MongoDB replica set `{{ $labels.rs_nm }}` is not in the expected state. Please ensure that all instances are running properly." summary: MongoDB replica set out of sync