Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

10/31/2017

Reading time:1 min

Cassandra CFStats to CSV Parser

by John Doe

Repository for a utility to parse cfstats into a csv file for analysisIn this repository you will find an executable jar as well as the source code for the cfstatsparser utility.The utility was built to provide an easily consumable form of the handy nodetool cfstats utility.The executable jar file is named cfstats-parser.one-jar.jarthe jar takes 2 command line argsarg[0] - the fully qualified cfstats file (source file)this file should be generated by piping the output of nodetool cfstats to a filearg[1] - the fully qualified .csv file (output file)To execute the jar, copy the jar to a destination. Then run the following command:java -jar cfstats-parser.one-jar.jar [source file] [output file][source file] = arg[0][output file] = arg[1]Once you have the output file, you can import it into Excel or another csv tool and then analyze the results, add graphs, format, etc.This utility has been tested with 1.2.12 of Cassandra and DSE 3.1.2. It also includes two "newish" metrics, which if not present via nodetool cfstats will be blank.Version 0.1 of the cfstatsparser has the following issues:No loggin supportVery little exception handlingIt's essentially a quick-and-dirty buildOnly one output formatPlease feel free to augment the tool with your additions.

Illustration Image

Repository for a utility to parse cfstats into a csv file for analysis

In this repository you will find an executable jar as well as the source code for the cfstatsparser utility.

The utility was built to provide an easily consumable form of the handy nodetool cfstats utility.

The executable jar file is named cfstats-parser.one-jar.jar

  • the jar takes 2 command line args
    • arg[0] - the fully qualified cfstats file (source file)
      • this file should be generated by piping the output of nodetool cfstats to a file
    • arg[1] - the fully qualified .csv file (output file)

To execute the jar, copy the jar to a destination. Then run the following command:

java -jar cfstats-parser.one-jar.jar [source file] [output file]

  • [source file] = arg[0]
  • [output file] = arg[1]

Once you have the output file, you can import it into Excel or another csv tool and then analyze the results, add graphs, format, etc.

This utility has been tested with 1.2.12 of Cassandra and DSE 3.1.2. It also includes two "newish" metrics, which if not present via nodetool cfstats will be blank.

Version 0.1 of the cfstatsparser has the following issues:

  • No loggin support
  • Very little exception handling
  • It's essentially a quick-and-dirty build
  • Only one output format

Please feel free to augment the tool with your additions.

Related Articles

cassandra
tools
admin-monitor

Upgrading a Large Cassandra Cluster with cstar | Official Pythian® Blog

Valerie Parham-Thompson

1/27/2021

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

admin-monitor