-
Notifications
You must be signed in to change notification settings - Fork 428
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
replSetGetConfigCollector #295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Thanks for the fix.
Could you address the linter suggestions to set a base for further improvements?
Thanks !
Hi. Just wanted to let you know I haven't forget about this. Regards |
Hi, thanks for your attention. I think at least a test is needed to be reviewable. So it remains as a draft. I'll add a test when I have a time. Or, if you think this changes are usable I appreciate you take over this. |
Hello again.
Thanks for your help. |
@hiroshi Do you planning write some tests here? I think everything else is fine and can be merged then. |
EDIT: I gave up running linter locally. Tried to fix the linter error and checked it by pushing commits.. So you can ignore this comment.
I was trying to run linter on my local Apple Silicon mac, but not succeeded yet. I think this issue is related #286 How do I run those linter locally to check if my change is OK? |
The line where the linter reported an error,
is a almost identiacal to the line,
but it seems no linter error here. I'm not sure what difference cause the linter error... |
Also I was trying to run test on my local Apple silicon mac, but unable to run them. I created another pull request to address it -> #342 |
I fear that to run lint and test on my Apple silicon mac is unneccesary harder than fix lint and add test itself... |
c1eaf35
to
54ded8c
Compare
@percona-csalguero I fixed the linter error in 54ded8c. EDIT: No, this causes segfault on mongodb_exporter/exporter/replset_config_collector.go Lines 53 to 59 in 22b9fe3
|
6dbc21f
to
6049b11
Compare
exporter/replset_config_collector.go
Outdated
// const ( | ||
// replicationNotEnabled = 76 | ||
// replicationNotYetInitialized = 94 | ||
// ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we keeping this for purpose?
Thanks for all. |
FYI: You forgot to add info for this collector on the Collectors table |
Add replSetGetConfigCollector.
This is meant to resolve #292
It export metrics like this:
Usage example
Count number of members eligible for primary
count(mongodb_cfg_members_priority > 0 and mongodb_cfg_members_hidden == 0 and ignoring(member_state) mongodb_members_health == 1)
(I use this for alerting when the number is below 2)
TODO
Update jira ticket description if needed.Attach screenshots/console output to confirm new behavior to jira ticket, if applicable.When all checks have passed and code is ready for the review, bot should add
pmm-review-exporters
team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forums and Discord.