Skip to content
Related Articles

Related Articles

Monitoring cluster in Cassandra
  • Last Updated : 24 Oct, 2019

The tools for monitoring Cassandra cluster include nodetool, Jconsole and Opscenter. All these tools for monitoring cluster works by communicating through JMX(Java Management Extension).
In Cassandra Through JMX, explores many metrics and commands which any of them. These tools can use to monitor and manage a Cassandra cluster. In this article we will discuss nodetool.

Nodetool:
It is one of the important tool for monitoring and managing Cassandra cluster. There are many options are available through nodetool for monitoring a cluster.
For complete list of nodetool options used the following CQL query.

nodetool help;

Let’s have a look some of few very important nodetool commands for monitoring Cassandra cluster.
For example:

1. nodetool status
2. nodetool info
3. nodetool ring
4. nodetool cfstats
5. nodetool cfhistograms 

These are explained as following below.

1. nodetool status:
It is defined as the status of a node. It describe the state, IP address of a node, load carrying, owns, host id and rack information.
To check the nodetool status used the following CQL query.



nodetool status;

Let’s have a look on screenshot given below.


Figure – nodetool status

2. nodetool info:
It gives the information of nodes in which it tells about ID, data center, cache information such that row cache, key cache, uptime in seconds, and heap memory usage etc.
To check the nodetool information used the following CQL query.

nodetool info; 

Let’s have a look on screenshot given below.


Figure – nodetool information

3. nodetool ring:
It provide the information about node status and information about the ring.
To check the nodetool ring used the following CQL query.

nodetool options ring ( -r | --resolve-ip ) --  

Let’s have a look on screenshot given below.


Figure – nodetool ring



4. nodetool cfstats:
The tool has been renamed to nodetool tablestats. nodetool tablestats provides statistics about one or more tables.
To check the nodetool tablestats used the following CQL query.

$ nodetool [ options ] tablestats
    [ -H | --human-readable ] 
    [ -i  table [, table ] . . . ] [ - - ] 
    [ keyspace | table | keyspace.table ] [keyspace | table | keyspace.table ] 

Let’s have a look on screenshot given below.


Figure – nodetool tablestats

5. nodetool cfhistograms:
This tool has been renamed to nodetool tablehistograms. It provide the initial troubleshooting performance metric and current performance statics for read and write latency on a table during the past fifteen minutes to monitor a cluster in Cassandra.
To check the nodetool cfhistograms used the following CQL query.

nodetool options tablehistograms 
[--] keyspace_name table_name

or
nodetool options cfhistograms  

Let’s have a look on screenshot given below.


Figure – nodetool cfhistograms or nodetool tablehistograms

Try out the all-new GeeksforGeeks Premium!

My Personal Notes arrow_drop_up
Recommended Articles
Page :