Cassandra
The Apache Cassandra source collects metrics and logs from Cassandra. Metrics are scraped over JMX using the OpenTelemetry JMX metrics JAR with the cassandra target system. Logs are read from Cassandra's system, debug, and garbage collection log files and parsed into structured records.
Supported Telemetry
macOS
✓
✓
Linux
✓
✓
Windows
✓
✓
Prerequisites
Metrics (JMX)
JMX remote access enabled on the Cassandra node, with a reachable JMX/RMI port (default
7199). By default Cassandra binds JMX to localhost only; enabling remote access requires changingLOCAL_JMXincassandra-env.shand is described in the Apache Cassandra monitoring documentation.The OpenTelemetry JMX metrics JAR present on the collector host (
jar_path, default/opt/opentelemetry-java-contrib-jmx-metrics.jar).A Java runtime on the collector host to run the JMX metrics JAR.
Network reachability from the collector to the Cassandra JMX/RMI port.
Logs
The Cassandra node writing the log files you want to collect (system, debug, garbage collection).
The collector running on the same host as Cassandra with read access to the log file paths.
Configuration

General
Choose Telemetry Type
Telemetry Selector
No
["Logs", "Metrics"]
Which signals to collect. Valid values: Logs, Metrics.
Logs
Shown when Telemetry Type includes Logs.
System Logs
Boolean
No
true
Enable collection of system logs.
System Log Path(s)
Strings
Yes
["/var/log/cassandra/system.log"]
File paths to system logs. Shown when System Logs is enabled.
Debug Logs
Boolean
No
true
Enable collection of debug logs.
Debug Log Path(s)
Strings
Yes
["/var/log/cassandra/debug.log"]
File paths to debug logs. Shown when Debug Logs is enabled.
Garbage Collection Logs
Boolean
No
true
Enable collection of garbage collection logs.
GC Log Path(s)
Strings
Yes
["/var/log/cassandra/gc.log"]
File paths to garbage collection logs. Shown when Garbage Collection Logs is enabled.
Metrics
Shown when Telemetry Type includes Metrics.
Address
String
No
localhost
IP address or hostname to scrape for Cassandra metrics.
Port
Integer
No
7199
Port to scrape for Cassandra metrics.
Advanced
Timezone
Timezone
No
UTC
The timezone to use when parsing timestamps. Shown when collecting Logs.
Start At
Enum: beginning, end
No
end
Start reading logs from beginning or end. Shown when collecting Logs.
Parse
Boolean
No
true
Parse the log fields into structured data. Shown when collecting Logs.
JMX Metrics Collection Jar Path
String
No
/opt/opentelemetry-java-contrib-jmx-metrics.jar
Full path to the JMX metrics jar. Shown when collecting Metrics.
Collection Interval
Integer
No
60
How often (seconds) to scrape for metrics. Shown when collecting Metrics.
Examples
Collect metrics and logs from a local Cassandra node
Collect JMX metrics from Cassandra on the default port and read the system, debug, and garbage collection logs from their default paths on the same host.
Metrics only from a remote node
Scrape JMX metrics from a remote Cassandra node every 30 seconds and disable log collection.
Configuration Tips
Log collection reads files on the local filesystem, so the collector must run on the same host as Cassandra. JMX metrics can be scraped remotely by setting Address and Port to a reachable JMX/RMI endpoint.
The JMX metrics JAR and a Java runtime must be present on the collector host. If you store the JAR somewhere other than
/opt/opentelemetry-java-contrib-jmx-metrics.jar, update the JMX Metrics Collection Jar Path.Set Start At to
beginningto backfill existing log content on first run; leave it atendto only collect new entries.
Troubleshooting
Connection refused on the JMX port
Symptoms: metrics do not appear and the collector logs a connection error to the JMX/RMI port.
Solutions:
Confirm Cassandra has remote JMX enabled (by default it binds to localhost only) and the JMX/RMI port is reachable from the collector.
Verify Address and Port match the node's JMX endpoint and that any firewall allows traffic to the port.
Metrics fail to start
Symptoms: the JMX receiver fails to launch or reports a missing JAR.
Solutions:
Confirm the JMX metrics JAR exists at the path set in JMX Metrics Collection Jar Path on the collector host.
Confirm a Java runtime is installed and on the collector host.
No logs collected
Symptoms: log collection is enabled but no log records arrive.
Solutions:
Verify the log file paths exist and that the collector has read access to them.
Confirm the collector is running on the same host as Cassandra, since logs are read from the local filesystem.
Standalone Source
Related Resources
Last updated
Was this helpful?