SQL Statements
SHOW NODES
Overview
The SHOW NODES
statement returns the current state of the cluster and is only available to the superuser.
It is not case-sensitive, so
show nodes
, Show Nodes
, and SHOW NODES
do the same thingExample
To view the current cluster state, you need to execute the following command:
Once it’s done, you’ll see a table with the information about each node in the cluster, in a following way:
Each row represents the state of an individual node within the cluster, where:
name
: name of the nodeelection_state
: current state of the node (e.g.LEADER
)followers_count
: number of nodes following the leader, which applies to the leader nodeconnected_nodes_count
: total number of nodes connected, including itselfdegradation_error
: error message if the node is not working correctly, otherwise it showsNULL