RabbitMQ - rabbitmqctl cluster_status

by
Jeremy Canfield |
Updated: November 03 2021
| RabbitMQ articles
The rabbitmqctl cluster_status command can be used to view the current nodes in the cluster. In this example, "nodes" shows that there are 3 nodes in the cluster, and "running_nodes" shows that all 3 nodes are running. If one or more nodes are not showing as "running_nodes", refer to RabbitMQ - Resolve "node is down" or "node statistics not available".
Notice also that "partitions" contains servers. Typically, partitions is an empty array. When partitions contains server, this implies an issue with the cluster.
~]# rabbitmqctl cluster_status
Cluster status of node rabbit@server1
[{nodes,[{disc,[rabbit@server1,rabbit@server2,rabbit@server3]}]},
{running_nodes,[rabbit@server1,rabbit@server2,rabbit@server3]},
{cluster_name,<<"rabbit@server1.example.com">>},
{partitions,[{rabbit@server2,[rabbit@server3]},
{rabbit@server3,[rabbit@server2]}]},
{alarms,[{rabbit@server2,[]},{rabbit@server3,[]}]}]
Or, the output may look like this.
~]# rabbitmqctl cluster_status
Cluster status of node rabbit@server001 ...
Basics
Cluster name: rabbitmq.example.com
Disk Nodes
rabbit@rabbit1
rabbit@rabbit2
rabbit@rabbit3
Running Nodes
rabbit@rabbit1
rabbit@rabbit2
rabbit@rabbit3
Versions
rabbit@rabbit1: RabbitMQ 3.8.0 on Erlang 22.1.2
rabbit@rabbit2: RabbitMQ 3.8.0 on Erlang 22.1.2
rabbit@rabbit3: RabbitMQ 3.8.0 on Erlang 22.1.2
Alarms
(none)
Network Partitions
(none)
Listeners
Node: rabbit@rabbit1, interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Node: rabbit@rabbit2, interface: [::], port: 5671, protocol: amqp/ssl, purpose: AMQP 0-9-1 and AMQP 1.0 over TLS
Node: rabbit@server001, interface: [::], port: 15671, protocol: https, purpose: HTTP API over TLS (HTTPS)
Node: rabbit@rabbit3, interface: [::], port: 15692, protocol: http/prometheus, purpose: Prometheus exporter API over HTTP
Feature flags
Flag: drop_unroutable_metric, state: disabled
Flag: empty_basic_get_metric, state: disabled
Flag: implicit_default_bindings, state: disabled
Flag: quorum_queue, state: enabled
Flag: virtual_host_metadata, state: disabled
The --formatter json option can be used to return the output in JSON.
rabbitmqctl cluster_status --formatter json
Did you find this article helpful?
If so, consider buying me a coffee over at