dcu / mongodb_exporter

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

Get replication lag in an easy way #58

Closed zhihuiFan closed 7 years ago

zhihuiFan commented 7 years ago

Currently we have some metrics like

mongodb_replset_member_optime_date{name="a:27017",set="stgResource",state="SECONDARY"} 1.494836609e+09
mongodb_replset_member_optime_date{name="b:27017",set="stgResource",state="PRIMARY"} 1.494836609e+09

but I can't the the replication lag easily with Prometheus recording rule. Do you have any suggestion on this?

is it ok to expose the replication_lag for current instance directly?

Thanks

zhihuiFan commented 7 years ago

@dcu could you have a look at this?

dcu commented 7 years ago

@zhihuiFan sure, just a minor typo fix is needed

deepthawtz commented 7 years ago

issue can close if this has been merged