-
Notifications
You must be signed in to change notification settings - Fork 66
check-rabbitmq-node-health picks only first nodes in the cluster #43
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
Comments
it is low hanging fruit and here is the proposal for the fix if everyone agrees i will move forward with the fix change the call from "#{url_prefix}://#{host}:#{port}/api/nodes”, -> "#{url_prefix}://#{host}:#{port}/api/nodes/rabbit@#{host}” change the nodeinfo from nodeinfo = JSON.parse(resource.get)[0] -> nodeinfo = JSON.parse(resource.get) make the host address not optional and make the hostname as real hostname |
Not a bad idea, but why can't we use rabbitmqctrl instead of the admin API and also makes less complex |
@arjuntalla can you link me to the proposal? |
Apologies misread thought you meant there was an existing proposal. |
that makes sense to me, we should maybe have a default of the first node (or even better try to find the right node based on something we can know like its ipaddress?). This makes it a backwards compatible change. |
"#{url_prefix}://#{host}:#{port}/api/nodes/rabbit@#{host}”, it‘s a good diea. but the ’host ‘ must a hostname, IP address will don't work. |
makes sense from what I saw of your commit I think yours works, do you want to pr it for a bit closer review? |
I've submitted a PR to fix this with configurable options in PR #70. Some of the fixes listed in this thread make assumptions about node naming that wouldn't be compatible with non-default naming methods. This also adds 3 new options to override the node name determined by the check if needed. |
When we have a list of nodes in cluster it always pick first nodes in list and show health is ok.
call is made for nodes ("#{url_prefix}://#{host}:#{port}/api/nodes/) -> returns a list of all nodes in cluster
function to pick node nodeinfo = JSON.parse(resource.get)[0] -> picked first nodes in the list.
ex: if the list is rabbitmq1, rabbitmq2, rabbitmq3, it checks the health on rabbitmq1 only always as it is first is list.
The text was updated successfully, but these errors were encountered: