Monitoring and collecting data from Cassandra

The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear scalability and proven fault-tolerance on commodity hardware or cloud infrastructure make it the perfect platform for mission-critical data. Cassandra’s support for replicating across multiple datacenters is best-in-class, providing lower latency for your users and the peace of mind of knowing that you can survive regional outages.

More information on: http://cassandra.apache.org/

How it works

This plugin gathers some global statistics from your Cassandra server.

It gets these statistics using Cassandra’s JMX interface.

Installation

The plugin needs to be installed together with a CoScale agent, instructions on how to install the CoScale agent can be found here. If you want to monitor Cassandra inside Docker containers using CoScale, check out the instructions here.

Configuration

Enable JMX Connection

To enable JMX in Cassandra, add the following line in <instalation_folder>/conf/cassandra-env.sh.

JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=localhost"

Restart Cassandra to apply these changes.

Active checks

This plugin can be configured to perform a CQL query on your Cassandra. This active monitoring allows us to calculate the uptime of the service and the response time of the provided query.

A keyspace and valid CQL query (eg. SELECT * FROM users WHERE first_name = 'jane' and last_name='smith';) should be provided.

Metrics

Cassandra

Name Unit Dimensions
Cassandra active check latency s  
Cassandra active check uptime %  
Cassandra active count tasks Bean, Type
Cassandra bytes compacted b  
Cassandra dropped messages count msg Bean, Type
Cassandra storage load b Bean, Type
Cassandra total batches replayed batches Bean, Type
Cassandra total CommitLog Size b Bean, Type
Cassandra uptime s  

Cassandra / Hits

Name Unit Dimensions
Cassandra hits hits Bean, Type

Cassandra / Memory

Name Unit Dimensions
Cassandra CPU Time s  
Cassandra free physical memory size b  
Cassandra free swap space size b  
Cassandra heap memory size b Attribute
Cassandra non heap memory size b Attribute
Cassandra total swap space size b  

Cassandra / Tasks

Name Unit Dimensions
Cassandra completed tasks tasks Bean, Type
Cassandra pending tasks tasks Bean, Type
Cassandra total blocked tasks tasks Bean, Type

Cassandra / Thread

Name Unit Dimensions
Cassandra threading daemon thread count threads  
Cassandra threading Peak thread count threads  
Cassandra threading thread count threads  
Cassandra threading total started thread count threads  

Cassandra / Threads

Name Unit Dimensions
Cassandra core threads threads Bean, Type

Events

Name Description Attributes
CASSANDRA service state watcher State watcher status