How to get rabbitmq federation link status using rabbitmq HTTP calls.

54 views
Skip to first unread message

Anurag

unread,
Nov 9, 2018, 6:32:35 PM11/9/18
to rabbitmq-users
Hi RabbitMQ experts,

Does some one know how can I get the status of the federation links using the RabbitMQ's HTTP APIs? I am able to get the definition of the federation upstream by the following example, but can't find a way to get its status.

Call - http://[hostname]:15672/api/parameters/federation-upstream returns me 
[{"value":{"uri":["amqp://USER:PASSWORD@HOSTNAME:4003/VHOST"],"trust-user-id":false,"exchange":"anurag.fed"},"vhost":"VHOST","component":"federation-upstream","name":"upstream-fed"}]

The official documentation says, the link status can be monitored by rabbitmqctl or GUI, but it does not mention HTTP apis anywhere. Does this mean that rabbitmq does not have this capability in APIs? If it has can someone please help?

https://www.rabbitmq.com/federation-reference.html
"You can monitor the status of federation links using rabbitmqctl and the management plugin."

RabbitMQ version being used: 3.6.8

Thanks,
Anurag



Luke Bakken

unread,
Nov 10, 2018, 8:46:24 AM11/10/18
to rabbitmq-users
Hello,

Please refrain from posting to both this mailing list and stack overflow. The RabbitMQ core team monitors both, and it's kind of annoying to answer in one place only to see the same question posted here. At the very least, indicate that you have posted this question elsewhere.

https://stackoverflow.com/a/53239568/1466825


The RabbitMQ management UI uses REST calls to fetch data, and you have the ability to trace those calls:

Enable the rabbitmq_federation_management plugin. Via the web UI, browse to the page showing the status you're looking for. Then, open the developer tools in your web browser to trace the network requests and responses. You will see requests to various /api REST resources - one of them will be what you can use in your application.

Thanks,
Luke
Reply all
Reply to author
Forward
0 new messages