Skip to content

Cassandra

Auto-Discovery
Health Check
Metrics
Logs

To enable metrics gathering, Bleemeo agent needs to be installed with JMX enabled, see Java Metrics for setup details.

In addition Cassandra need to expose JMX over a TCP port. To enable JMX you will need to:

  • If using Docker, add environment variable JVM_OPTS=-Dcassandra.jmx.remote.port=7199
  • If running Cassandra and Bleemeo agent as native package, nothing should be needed. Cassandra already expose JMX on port 7199 on localhost by default.
  • In other case, add option -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.authenticate=false to the JVM.

Warning: this will allow unauthenticated access. Make sure no untrusted access to this port is possible or you should setup authenticated JMX access.

Bleemeo agent should auto-detect the JMX port, if some auto-detected parameters are wrong, you can manually override them by adding the following to /etc/glouton/conf.d/99-local.conf:

service:
[...]
# For a Cassandra running outside a container
- type: "cassandra"
address: "127.0.0.1"
port: 9042
jmx_port: 7199
jmx_username: "cassandra" # by default, no authentication is done
jmx_password: "cassandra"
# For an additional Cassandra running outside a container
- type: "cassandra"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 9043
jmx_port: 7200
jmx_username: "cassandra" # by default, no authentication is done
jmx_password: "cassandra"
# For a Cassandra running in a Docker container
- type: "cassandra"
instance: "CONTAINER_NAME"
address: "172.17.0.2"
port: 9042
jmx_port: 7199
jmx_username: "cassandra" # by default, no authentication is done
jmx_password: "cassandra"

Agent gathers the following metrics:

MetricDescription
service_statusStatus of Cassandra
cassandra_bloom_filter_false_ratioNumber of false positive of the bloom filter in percent
cassandra_jvm_gcNumber of garbage collection per second
cassandra_jvm_gc_utilizationGarbage collection utilization in percent
cassandra_jvm_heap_usedHeap memory used in bytes
cassandra_jvm_non_heap_usedNon-Heap memory used in bytes
cassandra_read_requestsNumber of read requests per second
cassandra_read_timeAverage time of read requests in seconds
cassandra_sstableNumber of SSTable
cassandra_write_requestsNumber of write requests per second
cassandra_write_timeAverage time of write requests in seconds

Bleemeo also support for detailed monitoring of specific Cassandra tables. To enable this, add the following to /etc/glouton/conf.d/99-local.conf:

service:
[...]
# For a Cassandra running outside a container
- type: "cassandra"
detailed_items:
- "keyspace1.table1"
- "keyspace2.table2"
[...]
# For a Cassandra running in a Docker container
- type: "cassandra"
instance: "CONTAINER_NAME"
detailed_items:
- "keyspace1.table1"
- "keyspace2.table2"
[...]

The following per-table metrics will be gathered:

MetricDescription
cassandra_bloom_filter_false_ratioNumber of false positive of the bloom filter in percent
cassandra_read_requestsNumber of read requests per second
cassandra_read_timeAverage time of read requests in seconds
cassandra_sstableNumber of SSTable
cassandra_write_requestsNumber of write requests per second
cassandra_write_timeAverage time of write requests in seconds