Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to monitor number of members eligible for primary? #292

Closed
hiroshi opened this issue Jun 10, 2021 · 2 comments · May be fixed by #295
Closed

How to monitor number of members eligible for primary? #292

hiroshi opened this issue Jun 10, 2021 · 2 comments · May be fixed by #295

Comments

@hiroshi
Copy link
Contributor

hiroshi commented Jun 10, 2021

Is it a way to count the number of members eligible for primary?

I'm not sure, but to get the information, priority and hidden of replSetGetConfig is needed.
https://docs.mongodb.com/manual/reference/command/replSetGetConfig/#mongodb-dbcommand-dbcmd.replSetGetConfig
However replSetGetConfig is not the list at v0.20.5.

Or anythink alike in the current set of metrics?

Thanks in advance.

@percona-csalguero
Copy link
Contributor

Hello,

I am not a MongoDB expert but as a developer being done some work in a backup tool for MongoDB I can tell you hidden servers are not elegible to become primary. Because of that, the backup tools search for hidden servers to use as the backup source since reading them won't affect the client's performance.
Priority IS taken into account and probably arbiterOnly too.

Regards.

@hiroshi
Copy link
Contributor Author

hiroshi commented Jun 11, 2021

Hi @percona-csalguero,
Thanks for your attention.

Sorry for my vague question. I meant to ask it in the context of percona/mongodb_exporter.

So, my question is:
Using percona/mongodb_exporter, Is it a way to tell that primary eligible members are more than one?

Anyway, I was starting to extend percona/mongodb_exporter. Make it get those information with replSetGetConfig.
I'll create a PR when it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants