rabbitmqrabbitmqctl

How to determine if a RabbitMQ instance is a single node or cluster?


I need to upgrade a RabbitMQ instance to a newer version of RabbitMQ. In the documentation for upgrading, it mentions there are two upgrade strategies: single node or cluster. I'm unsure what we have, so I've been reading the docs for the rabbitmqctl CLI tool. I'm hoping a command will give me the information I need.

Given the output below, would it be reasonable to say we are running a single node instance of RabbitMQ?

$ sudo rabbitmqctl cluster_status

Cluster status of node rabbit@myserver01
[{nodes,[{disc,[rabbit@myserver01]}]},
 {running_nodes,[rabbit@myserver01]},
 {cluster_name,<<"rabbit@myserver01.mydomain.com">>},
 {partitions,[]},
 {alarms,[{rabbit@myserver01,[]}]}]

To me, it appears that this returns an array as the output (given the square brackets surrounding the output). It also seems we have 1 node running which suggests a single node instance.

But, it also makes reference to the cluster_name property, which could suggest a clustered environment. Is this actually a single node instance since we only have 1 node listed?

Thank you!


Solution

  • You have a single node.

    The cluster_name property is always set, even for single nodes.