mongodb_exporter icon indicating copy to clipboard operation
mongodb_exporter copied to clipboard

Addition of metric source - replSetGetConfig for getting voting member information

Open jaison8940 opened this issue 2 years ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe. There is no metric exposed currently to know whether a node is voting member or not.

E.g. mongodb_config_members_votes 0 -> non voting member mongodb_config_members_votes 1 -> voting member

Describe the solution you'd like I would like to write a new collector for replSetGetConfig.

Describe alternatives you've considered I could not find any alternatives.

jaison8940 avatar Sep 25 '23 13:09 jaison8940

Hi, I wrote a patch about adding replsetGetConfig metrics.

  • https://github.com/percona/mongodb_exporter/pull/295

This is a forked version based on old version of mongodb_exporter (maybe around 0.20).

It had worked for me so far, but after our MongoDB is upgraded to 5.0, it keep missing $collStats. (Maybe some compatibility issues between MongoDB versions and the old expoter versions).

I'm going to work around this issue. However, once I gave up the patch to be merged to main and I am tired of catching up to new code base.

I may share some information when it goes well.

hiroshi avatar Feb 07 '24 09:02 hiroshi