Cassandra plugin

Cassandra is a scalable and fault-tolerant NoSQL database system. For more information visit


Even if the Cassandra plugin is not configured, Stackdriver Monitoring discovers Cassandra services running in your Cloud Platform project by:

  • searching instance names for cassandra
  • checking for ports opened to 9160 via firewall rules

The services discovered are displayed on the Cassandra Services page in the Resources menu. After you install the Monitoring agent and configure the Cassandra plugin on your instances, Monitoring populates the Cassandra Services page with inventory and metrics.

Configuring Monitoring to monitor Cassandra

After you install the Monitoring agent, use the following instructions to configure the Cassandra plugin on your instances. For instructions on upgrading from the legacy jmxtrans monitoring, go to Upgrading from jmxtrans.


The Cassandra plugin requires version 5.5.0-257 or later of the Monitoring agent. To update the agent, go to Upgrading the agent.

Enabling the Cassandra monitoring plugin

Cassandra is monitored via JMX. Monitoring has separate configurations for monitoring Cassandra versions 2.1.x and below, and versions 2.2.x and above.

On your VM instance, download the appropriate configuration file from the GitHub configuration repository based on your Cassandra version and place it in the directory /opt/stackdriver/collectd/etc/collectd.d/:


Download cassandra-22.conf into /opt/stackdriver/collectd/etc/collectd.d/:

(cd /opt/stackdriver/collectd/etc/collectd.d/ && sudo curl -O

<= 2.1.x

Download cassandra.conf into /opt/stackdriver/collectd/etc/collectd.d/:

(cd /opt/stackdriver/collectd/etc/collectd.d/ && sudo curl -O

The downloaded plugin configuration file assumes that your Cassandra instance is configured to accept JMX connections on port 7199. If you have configured Cassandra with a different JMX port, as root, edit the file and follow the instructions to change the JMX port settings.

After adding the configuration file, restart the monitoring agent by running the following command:

sudo service stackdriver-agent restart

Information on other plugin configuration options can be found at

What is monitored

The Cassandra plugin monitors the following metrics:

  • Storage Load: The amount of data stored on each Cassandra node.
  • Pending Tasks: The number of basic task stages waiting to run.
  • Active Tasks: The number of basic task stages currently running.
  • Blocked Tasks: The number of basic task stages blocked from running.
  • Pending Internal Tasks: The number of internal task stages waiting to run.
  • Active Internal Tasks: The number of internal task stages currently running.

Monitoring also monitors the following basic JVM metrics:

  • Active JVM Threads
  • JVM Heap memory usage
  • JVM Non-Heap memory usage
  • JVM Open File Descriptors
  • JVM Garbage Collection Count

For details, go to Agent metrics list: Cassandra and Agent metrics list: JVM.

Upgrading from jmxtrans

If you are currently running a VM with the legacy jmxtrans monitoring, you need to upgrade all of the Java-based plugins, namely Cassandra, HBase, Kafka, or Tomcat. After you've upgraded those plugins and restarted the stackdriver-agent service, you can shut down the jmxtrans process. You can then uninstall jmxtrans by removing the /mnt/jmxtrans tree and the /etc/init.d/jmxtrans script (if the script is present).

Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Monitoring
Need help? Visit our support page.