Here's a great way to get an overarching view of your Cassandra clusterThe nodetool cfstats output is a great tool to get an understanding of what exists in your cluster. There are many resources out there to help you understand how to interpret the output of this utility, here's one from the C* 1.2 documentation.
We like to use the output of cfstats as an entry point for analyzing C* clusters.
However, I have found that reviewing this data in a different format, i.e. in Excel, is even more helpful.
Cfstats provides output as a scrollable list of data points. Here's a snippet from one of my test environments:
This is a good format as there are many helpful data points listed in this output.
However, leveraging an excel table format to analyze cfstats output provides a lot of benefits over the standard output.
A picture's worth a thousand words, so here's what I mean by analyzing in Excel:
Using cfstats in a tool like Excel provides the following benefits over the traditional approach to analyzing cfstats:
- You can sort your output to find interesting patterns and quickly pinpoint problems, like which CFs are read from or written to the most.
- In the above example, i've sorted by read latency and can immediately see that I have a few CFs that are behaving poorly with read operations.
- You can add aggregated columns, like Read Ratio and Write Ratio, to empirically understand the usage patterns in a keyspace.
- In the above example, I've added to aggregate columns and changed the header cell color to grey
- You can add charting to visually compare CF metrics
- Leverage the output as a communication tool with other team members and management
- Management really does love Excel don't they :)
So, how do you get the above format into an excel format? Easy, you can use this little utility that I've posted on GitHub here: https://github.com/jlacefie/cfstats-csv-parser.
Check out the README file for instructions on using the tool. It's really easy and straightforward.
Using cfstats in Excel as an entry point into cluster analysis is a handy way to get a big picture understanding of the contents and behavior of your cluster. From here, leverage tools such as OpsCenter, cfhistograms and tpstats for troubleshooting and deep-dive investigation.
Good luck and happy "Cassandra-ing"