Skip to main content

Cassandra collector

Cassandra is an open-source NoSQL database management system.

This module will monitor one or more Cassandra servers, depending on your configuration.

Requirements

To configure Cassandra with the JMX Exporter:

Note: paths can differ depends on your setup.

  • Download latest jmx_exporter jar file and install it in a directory where Cassandra can access it.
  • Add the jmx_exporter.yaml file to /etc/cassandra.
  • Add the following line to /etc/cassandra/cassandra-env.sh
    JVM_OPTS="$JVM_OPTS $JVM_EXTRA_OPTS -javaagent:/opt/jmx_exporter/jmx_exporter.jar=7072:/etc/cassandra/jmx_exporter.yaml
  • Restart cassandra service.

Metrics

All metrics have "cassandra." prefix.

Labels per scope:

  • global: no labels.
  • thread pool: thread_pool.
MetricScopeDimensionsUnits
client_requests_rateglobalread, writerequests/s
client_request_read_latency_histogramglobalread, writeseconds
client_request_write_latency_histogramglobalread, writeseconds
client_requests_latencyglobalread, writeseconds
row_cache_hit_ratioglobalhit_ratiopercentage
row_cache_hit_rateglobalhits, missesevents/s
row_cache_utilizationglobalusedpercentage
row_cache_sizeglobalsizebytes
key_cache_hit_ratioglobalhit_ratiopercentage
key_cache_hit_rateglobalhits, missesevents/s
key_cache_utilizationglobalusedpercentage
key_cache_sizeglobalsizebytes
storage_live_disk_space_usedglobalusedbytes
compaction_completed_tasks_rateglobalcompletedtasks/s
compaction_pending_tasks_countglobalpendingtasks
compaction_compacted_rateglobalcompactedbytes/s
thread_pool_active_tasks_countthread poolactivetasks
thread_pool_pending_tasks_countthread poolpendingtasks
thread_pool_blocked_tasks_countthread poolblockedtasks
thread_pool_blocked_tasks_ratethread poolblockedtasks/s
jvm_memory_usedglobalheap, nonheapbytes
jvm_gc_rateglobalparnew, cmsgc/s
jvm_gc_timeglobalparnew, cmsseconds
dropped_messages_rateglobaldroppedmessages/s
client_requests_timeouts_rateglobalread, writetimeout/s
client_requests_unavailables_rateglobalread, writeexceptions/s
client_requests_failures_rateglobalread, writefailures/s
storage_exceptions_rateglobalstorageexceptions/s

Configuration

Edit the go.d/cassandra.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/cassandra.conf

Here is an example for 2 servers:

jobs:
- name: local
url: http://127.0.0.1:7072/metrics

- name: remote
url: http://203.0.113.10:7072/metrics

For all available options please see module configuration file.

Troubleshooting

To troubleshoot issues with the cassandra collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m cassandra

Was this page helpful?

Need more help?