dcu / mongodb_exporter

MongoDB exporter for prometheus.io
MIT License
353 stars 216 forks source link

Dashboard mongodb_replset_oplog_head_timestamp => mongodb_replset_oplog_tail_timestamp #77

Open YouriT opened 6 years ago

YouriT commented 6 years ago

In the dashboard you referenced, I noticed that the oplog lag was based on mongodb_replset_oplog_head_timestamp but IMO it should use use the tail counterpart mongodb_replset_oplog_tail_timestamp no?

The head according to collector/oplog_status.go is calling GetOplogTimestamp(.., false) which will show the oldest value instead of the newest.

Btw, head should be the most recent and tail the oldest oplog entry don't you think?

It might not have it's place here but I don't know how to contact the one maintaining the dashboard and you referenced it.