dcu / mongodb_exporter

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

Hidden node #41

Closed mg03 closed 7 years ago

mg03 commented 8 years ago

I dont see metrics from a hidden node in my replset.

Is that by design or am I doing something wrong?

deepthawtz commented 8 years ago

we run hidden members in our replsets too and do not see stats for these nodes.

I'm googling around to see if this is an inherent limitation of dbStats() w/ hidden members or if there is a way to collect stats somehow.

So far all I can find is "[a hidden member] is invisible to client applications" https://docs.mongodb.com/v3.2/core/replica-set-hidden-member/ and prom exporter is essentially just another client application. Any help appreciated if you can find any info.

yunusemrecatalcam commented 4 years ago

Hey from the future. Similar but not the same; We also have a hidden node, I can see it as a member on member state graph. I'm running 3 instance of exporter for 3 mongo (1 master and 2 rs). While I can get the metrics from rs that is not hidden, can't get metric from hidden rs. Exporter trying to crawl metric from hidden rs prints an error like this:

level=error msg="Failed to get replSetGetConfig: (Unauthorized) command replSetGetConfig requires authentication." source="replset_conf.go:115

I've tried manually logging in to hidden rs with the same user and querying the same as code do: db.runCommand( { replSetGetConfig: 1 } ); and it returned the data succesfully which makes us think it's not a authorization issue actually. Any help is appreciated, thank y'all