Check cluster status

To check the cluster status, run the following command in the leader node of your ZooKeeper ensemble:

$ echo mntr | nc localhost 2181

You should see an output similar to this:

zk_server_state leader
zk_followers 2

The first line of the above output indicates that the node is the current elected leader. This leader node contains privileged information such as the number of the existing follower nodes (second line in the output above). The cluster status is correct when the number of zk_followers + 1 is equal to the total number of the entire cluster.

Last modification September 5, 2018