Back to Articles

Using nodetool

The Cassandra nodetool utility can be used as a point of verification for checking that Cassandra is configured correctly and data has been replicated.

The following is an example output of running the nodetool status command on one of the Cassandra nodes:

[arris@nxt-failover-eastus2-cass01 logs]# nodetool status 

Datacenter: AlarmCentral_Cluster
================================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 10.20.1.32 350.3 GB 256 ? a74e50f3-761a-4917-8185-f3516cd4c11e RAC2
UN 10.20.1.33 350.3 GB 256 ? 9ca1b6a8-5847-4536-95e2-67a224ad1d49 RAC3
UN 10.20.1.31 350.74 GB 256 ? 3e2a43e1-367e-4d74-a9fc-9701a6d09064 RAC1

Datacenter: AlarmCentral_Cluster_SiteB
======================================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 10.30.1.31 370.5 GB 256 ? 879eb66b-4e24-467c-8956-00430277bc4f RAC1
UN 10.30.1.32 370.52 GB 256 ? 16cea4db-12de-4602-8450-96a7f355c500 RAC2
UN 10.30.1.33 369.88 GB 256 ? dd48d3f8-82c5-498e-aa89-0925ab72ed3c RAC3

Using cqlsh

A CQL query can be issued to Cassandra directly as another point of validation that data is being replicated. Run this query periodically to spot check that data is being replicated between the datacenters.

To run the query, log in to a Cassandra node on Site B and execute the following on the command line, with the following substitutions:
  • mytenant — Replaced with the target tenant name
  • FnId — Replaced with an active FN name
  • YYYYMMDD — Replaced with current date in YYYYMMDD format
    cqlsh `hostname`
    cqlsh> select fnid, pkey, created from mytenant.fnoutagesummary where fnid='FnId' and pkey=YYYYMMDD;