MongoDB replication headroom critical
>>>
sum
(
avg
(
mongodb_mongod_replset_oplog_head_timestamp
-
mongodb_mongod_replset_oplog_tail_timestamp
)) -
sum
(
avg
(
mongodb_rs_members_optimeDate
{member_state="PRIMARY"} - on (set) group_right
mongodb_rs_members_optimeDate
{member_state="SECONDARY"})) <= 0
The rule computes the total size of each replica set’s oplog window (head timestamp – tail timestamp) and subtracts the replication lag between the primary and its secondaries (primary optime – secondary optime). If the resulting value is ≤ 0, it means the primary’s latest data is already at or beyond the oldest entry still retained in the oplog, i.e., there is no replication headroom left, triggering the alert.
Exporters Used
Related Alerts
Mgob backup failed
MongoDB Down
MongoDB cursors timeouts
MongoDB cursors timeouts
MongoDB number cursors open
MongoDB number cursors open
MongoDB replication Status 10
MongoDB replication Status 3
MongoDB replication Status 6
MongoDB replication Status 8
MongoDB replication Status 9
MongoDB replication lag
MongoDB replication lag
MongoDB too many connections
MongoDB too many connections
MongoDB virtual memory usage
Mongodb replica member unhealthy