-
Notifications
You must be signed in to change notification settings - Fork 930
multiple master with host and port labels #372
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
Conversation
|
Thanks for the PR! Also, turns out I had Drone (the CI pipeline) for PRs turned off, oops. I turned it back on, could you please give this a little bump to trigger the pipeline and run tests, etc? Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #372 +/- ##
==========================================
+ Coverage 78.64% 78.92% +0.28%
==========================================
Files 2 2
Lines 899 911 +12
==========================================
+ Hits 707 719 +12
Misses 157 157
Partials 35 35
Continue to review full report at Codecov.
|
oliver006
left a comment
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.
Two smaller issues/questions but generally looks good, thanks for the PR!
exporter.go
Outdated
| slaveInfoFields = map[string]bool{"master_host": true, "master_port": true, "slave_read_only": true} | ||
| ) | ||
|
|
||
| if strings.HasPrefix(fieldKey, "master_host") { |
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.
From the snippet you posted in #371 it looks like this will occur in the # Replication section so maybe only pick these up while in the fieldClass == "Replication" section down starting line 810?
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.
Also, why HasPrefix and not match it exactly?
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.
I can simplify it.
exporter.go
Outdated
| } | ||
| return true | ||
| } | ||
| if fieldKey == "master_last_io_seconds_ago" || fieldKey == "slave_repl_offset" || fieldKey == "master_sync_in_progress" { |
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.
Can you redo this if statement with the one from line 714 and make it a switch on fieldKey?
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.
I can change to switch
|
Thanks for the changes! Two issues or questions:
|
|
Hi, I made some mistakes and ended deleting my branch and making new pull request #374 |
Fix for
#371