-
Notifications
You must be signed in to change notification settings - Fork 424
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
base: main
Are you sure you want to change the base?
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
4e2d78b
to
2497ae3
Compare
2497ae3
to
22b9fe3
Compare
This reverts commit 54ded8c.
Well, I tried to fix the lint error 54ded8c, Reverting 54ded8c fixs the segfault. I'm wondering how to fix the lint error. Can you help this? |
Just add the |
I'v just suppressed a set of lint errors at bb9ecc8. OK, I'll try to mitigate those error if possible.... I just copied implementation of replset_config_collector_test.go from replset_status_collector_test.go (also replset_config_collector.go). EDIT: Also I wonder why the check doesn't failed by those lint errors? |
Hello @hiroshi |
e2545b1
to
bb9ecc8
Compare
I'v just tried to resolve those conflict, but there are too much differences since the last merge in origin/main. It seems that I need to read new code base to adjust my changes.... |
43bfd04
to
828d774
Compare
…ctor # Conflicts: # README.md # exporter/exporter.go # main.go # main_test.go
828d774
to
bd5ca57
Compare
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.