| by Arround The Web | No comments

How to Fetch Cluster Information in Cassandra

“When performing diagnostics or troubleshooting, you will often need to gather information about your cluster. You can also use the gathered information and load the data into a monitoring tool such as Elasticsearch.

The purpose of this post is to show you where various cluster information is stored and what info you can gather from it.”

Let’s dive in.

Cassandra System Keyspace

If you want to gather information about your databases or cluster information, you need to look into the system keyspace.

This keyspace contains tables holding detailed information about your cluster and other objects in the server.

The following table shows the tables in the system keyspace and their corresponding columns.


Source: DataStax Documentation

To fetch information about your cluster, check the peers’ table, which holds information about each node in the server.

select * from system.peers;

 
The query should cluster node and cluster info as:


The output information includes the available peers, datacenter, host_id, release_version, rpc_addresses, schema versions, etc.

Closing

Using this tutorial, you became familiar with Cassandra system tables which contain cluster and database information. Feel free to explore the docs for more details.

Share Button

Source: linuxhint.com

Leave a Reply