Apache Cassandra
Description
Monitors performance, operational metrics, and cluster health for Cassandra databases through Java Management Extensions (JMX)
Target
Typical platform: Cassandra
Operating systems: Linux, Microsoft Windows
Prerequisites
Leverages: Apache Cassandra 3.0 or higher
Technology and protocols: JMX
Examples
CLI
metricshub HOSTNAME -t linux -c +Cassandra --jmx -u USER --jmx-port 7199
metricshub.yaml
resourceGroups:
<RESOURCE_GROUP>:
resources:
<HOSTNAME-ID>:
attributes:
host.name: <HOSTNAME> # Change with actual host name
host.type: linux
connectors: [ +Cassandra ] # Optional, to load only this connector
protocols:
jmx:
port: 7199
username: <USERNAME> # Change with actual credentials
password: <PASSWORD> # Encrypted using metricshub-encrypt
Connector Activation Criteria
The Apache Cassandra connector will be automatically activated, and its status will be reported as OK if all the below criteria are met:
- The JMX request below succeeds when querying the monitored resource:
- Object Name:
org.apache.cassandra.metrics:type=Storage,name=Load - Attribute:
Count - Expected Result:
^[0-9](regex)
- Object Name:
Metrics
| Type | Collected Metrics | Specific Attributes |
|---|---|---|
| cache | db.server.cache.operations{db.cache.state="hit"}db.server.cache.operations{db.cache.state="miss"}db.server.cache.requestsdb.server.cache.size | db.cassandra.cache.typedb.cluster.namedb.server.namedb.server.portdb.systemdb.version |
| cassandra | db.server.cache.usage{db.cache.state="off_heap", db.cassandra.cache.type="memtable"}db.server.cache.usage{db.cache.state="on_heap", db.cassandra.cache.type="memtable"}db.server.cassandra.hintsdb.server.current_connectionsdb.server.errors{error.type="read_timeout"}db.server.errors{error.type="read_unavailable"}db.server.errors{error.type="write_timeout"}db.server.errors{error.type="write_unavailable"}db.server.operations{db.io.direction="read"}db.server.operations{db.io.direction="write"}db.server.pending_operations{db.operation.type="compaction"}db.server.storage.io{db.io.direction="write"}db.server.storage.sizedb.server.uptime | db.cluster.namedb.server.namedb.server.portdb.systemdb.version |
| cassandra_cluster | db.server.cassandra.nodes{db.node.state="joining"}db.server.cassandra.nodes{db.node.state="leaving"}db.server.cassandra.nodes{db.node.state="live"}db.server.cassandra.nodes{db.node.state="moving"}db.server.cassandra.nodes{db.node.state="unreachable"} | db.cluster.namedb.server.namedb.server.portdb.systemdb.version |
| thread | db.server.threads{db.thread.state="active"}db.server.threads{db.thread.state="blocked"}db.server.threads{db.thread.state="pending"} | db.cassandra.thread.roledb.cluster.namedb.server.namedb.server.portdb.systemdb.thread.pooldb.version |