dcu / mongodb_exporter

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

Which metrics does it mean replication lag? #84

Open umnya opened 6 years ago

umnya commented 6 years ago

Hi. I would like to monitor replication lag. I installed mongodb_exporter and I cannot find any metrics related replication lag.

avishefi commented 6 years ago

my_replica_lag reports replset replication lag in seconds

umnya commented 6 years ago

I am watching a result of "localhost:9001/metrics", but I cannot find my_relica_lag.

avishefi commented 6 years ago

Depends on which version you have, I built a version of dcu lately and noticed the metric on the code: https://github.com/dcu/mongodb_exporter/blob/21fe4ed80fdf5e759175273ebedf22024806cef0/collector/replset_status.go

Here's the fork where I built it using Travis: https://github.com/avishefi/mongodb_exporter/releases

I'm trying to create a Travis build for dcu, but the repository administrator must do the setup as it requires administrative permissions.

umnya commented 6 years ago

I installed this version, and I can find "mongodb_replset_my_replica_lag" metrics.

Thank you so much.

zhihuiFan commented 6 years ago

I added this metric before and I'm so glad to see this help others as well:)