Open In App

Checking the Cluster Health in Cassandra

In this article, we are going to discuss checking the cluster health by using nodetool in Cassandra. Nodetool is one of the monitoring tools which helps in monitoring a cluster and performing routine maintenance tasks.

We will discuss three nodetool commands which will often use for checking the cluster’s health.



  1. nodetool status
  2. nodetool info
  3. nodetool tpstats

1. nodetool status :
In Cassandra, nodetool status commands are really helpful. This command enables you to check the health of a cluster’s node. nodetool status command is also useful to give information about the distribution of data among nodes. for example:

nodetool status 127.0.0.1   

Output:



The nodetool status command provides valuable information pertaining to the nodes such as the following.

2. nodetool info :
In Cassandra, Run the nodetool info command to get node information, such as status of gossip(active or not), disk load, Times started (generation), uptime, Key, row, counter, and chunk cache information, Percent repaired, Token information (optionally) and heap memory usage.

Here’s an example:

nodetool info 

Output:

3. nodetool tpstats :
In Cassandra, The nodetool tpstats command shows the usage statistics of thread pools. This command is very helpful in Cassandra. Cassandra breaks tasks into stages, with each stage using a separate queue and a thread pool. A messaging service connects the various stages.

This command will give you the overview statistics of thread pools. This command provides information about each stage of an operation by the thread pool. It shows the following things:

Here’s an approach to how this command will execute using the Cassandra architecture.
The database refreshes the information that the nodetool tpstats command provides when you flush memtables or when the database compacts any SSTables.

Here’s an example showing how to run the nodetool tpstats command:


The output of the nodetool tpstats command shows statistics pertaining to specific thread pools associated with tasks in the database. All this detailed information is quite useful to you when you’re troubleshooting issues or tuning the database.

Article Tags :