Display All Universe Node IPs from YCQL

A YugabyteDB universe is comprised of exactly one primary cluster and zero or more read replica clusters.

In YCQL we can display the IP addresses of the nodes in the Universe by querying two system tables.

				
					SELECT rpc_address FROM system.local; -- This is the node I am logged into
SELECT rpc_address FROM system.peers; -- These are the other nodes in the Universe
				
			

Example:

				
					cassandra@ycqlsh> SELECT rpc_address FROM system.local; -- This is the node I am logged into

 rpc_address
----------------
 172.164.59.169

(1 rows)

cassandra@ycqlsh> SELECT rpc_address FROM system.peers; -- These are the other nodes in the Universe

 rpc_address
----------------
 172.164.29.222
 172.164.42.157

(2 rows)
				
			

In the example, my Universe includes three nodes having the IP addresses 172.164.59.169, 172.164.29.222 and 172.164.42.157.

Have Fun!