-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: mongostat
-
None
To more accurately gauge replication lag and the rate that replication lag is increasing, as well as diagnose specific issues on particular secondaries it would be very useful to add a stat to the output of mongostat. This new metric would indicate the size of the back log of OpLog entries as seen by each secondary. This would be the count of op-log records in the range between T(last op-log on the primary) and T(last op-log received by this client). This would give an objective idea of a real replication lag. The way the lag is measured today - T(local)-T(last op-log received), - is an interesting measure which is easy and cheap to obtain but is not sufficient to give a real view of how big the replication lag really is.