dcu / mongodb_exporter

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

Unauthorized error on hidden node #123

Open yunusemrecatalcam opened 4 years ago

yunusemrecatalcam commented 4 years ago

We 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

grearter commented 4 years ago

@yunusemrecatalcam https://jira.percona.com/browse/PMM-4829