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

RabbitMQ monitoring app shows load balancer IP instead of client IP #98

Closed
runabol opened this issue Sep 25, 2014 · 6 comments
Closed

Comments

@runabol
Copy link

runabol commented Sep 25, 2014

When behind a load balancer, the RabbitMQ admin console shows the IP address of the load balancer for each connection -- instead of the original client IP. Would be great if there was a way to pass it along somehow when creating the connection.

@michaelklishin
Copy link

@creactiviti as far as RabbitMQ is concerned, the connection to it is indeed from the load balancer. There is no way for it to know how many proxies are involved. The same is true for client libraries.

@squaremo
Copy link
Collaborator

That's true, @michaelklishin, but perhaps the ability to put the origin IP in a client property would help, for debugging purposes at least. Is that your motivation, @creactiviti?

@runabol
Copy link
Author

runabol commented Sep 26, 2014

That's exactly right @squaremo -- thank you for clarifying that. Being able to provide an arbitrary suffix (in my case it would be the client's host ip) to the client property, visible on the console would totally work.

@squaremo
Copy link
Collaborator

OK, the code in master will let you supply additional clientProperties when you connect. It looks like this:

var amqp = require('amqplib');
amqp.connect('amqp://localhost', {clientProperties: {'IP': '10.0.0.3'}}).then(...);

The client property is visible in the management console if you go look at that specific connection; and, it'll be output by e.g., rabbitmqctl list_connections client_properties.

@runabol
Copy link
Author

runabol commented Sep 30, 2014

This is perfect. Thank you very much @squaremo. Any ETA on when it will be available on npmjs ?

@squaremo
Copy link
Collaborator

I'll have a look at the backlog and see if there's anything else I want to include -- otherwise, it can be a v0.2.2 pretty soon.

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

No branches or pull requests

3 participants