Bootstrap FreeKB - RabbitMQ - List nodes using the REST API
RabbitMQ - List nodes using the REST API

Updated:   |  RabbitMQ articles

This assumes you have created a RabbitMQ user with the administrator tag.

Refer to the RabbitMQ REST API documentation.

The curl command with the --user option can be used to make an API connection to RabbitMQ. In this example, John Doe will make a connection to the RabbitMQ server listening on port 15671 and then list the nodes in the cluster.

curl
--request GET
--user john.doe:itsasecret
--url http://hostname:15671/api/nodes

 

Or, the details of a single node can be returned.

curl
--request GET
--user john.doe:itsasecret
--url http://hostname:15671/api/nodes/node001

 

A significant amount of JSON will be returned. Here is but a few of the commonly used key value pairs that should be returned.

"config_files": [
  "/etc/rabbitmq/advanced.config",
  "/etc/rabbitmq/rabbitmq.conf"
],
"disk_free": 18552123392,
"enabled_plugins": [
  "rabbitmq_auth_backend_ldap",
  "rabbitmq_delayed_message_exchange",
  "rabbitmq_management",
  "rabbitmq_message_timestamp",
  "rabbitmq_prometheus",
  "rabbitmq_shovel",
  "rabbitmq_shovel_management"
],
"mem_limit": 4963865395,
"mem_used": 102375424
"name": "node001",
"net_ticktime": 120,
"running": true,

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter d1da45 in the box below so that we can be sure you are a human.