Monitor Apache Cassandra with OpenTelemetry and SigNoz

SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

Overview

Apache Cassandra runs on the JVM and exposes its internal metrics over JMX. This guide shows you how to collect those metrics with the standalone OpenTelemetry JMX Scraper, ship Cassandra logs through the OpenTelemetry Collector filelog receiver, and trace Cassandra queries from your application. Correlate all three signals in SigNoz on one platform.

You collect three signals here:

  • Metrics: read/write latency, compaction backlog, storage load, and JVM health through the OpenTelemetry JMX Scraper.
  • Logs: system.log through the Collector filelog receiver.
  • Traces: Cassandra driver spans from your application through OpenTelemetry instrumentation.

Prerequisites

Ensure you have:

  • An Apache Cassandra node running version 3.11 or newer
  • A Java runtime (JRE 11 or newer) wherever you run the JMX Scraper, with network access to the Cassandra JMX port
  • For logs: an OpenTelemetry Collector that can read the Cassandra log files
  • An instance of SigNoz (either Cloud or Self-Hosted)

Set Up Telemetry

Set up each signal you want. Collect metrics and logs separately; traces come from your application.

Cassandra exposes its metrics over JMX. The recommended collector is the standalone OpenTelemetry JMX Scraper: it connects to Cassandra's JMX port, maps the cassandra MBeans to OpenTelemetry metrics, and exports them to SigNoz.

The older Collector jmxreceiver is deprecated as of 2026-01-30: it runs Java inside the Collector, and the official Collector images ship without a Java runtime. This guide uses the JMX Scraper instead. If you already run the receiver, see the legacy jmxreceiver config below.

Step 1: Enable JMX on Cassandra

Cassandra ships with JMX enabled on localhost:7199 by default. To let the scraper connect, edit cassandra-env.sh and set the JMX bind options:

# in cassandra-env.sh
LOCAL_JMX=no
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=7199"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=7199"
JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<cassandra-host>"
# cassandra-env.sh turns JMX authentication ON when LOCAL_JMX=no. Disable it for a
# quick setup, or configure a jmxremote.password file and pass the credentials to the scraper.
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"

Restart Cassandra to apply the change. Replace <cassandra-host> with the address the scraper uses to reach the node (the RMI stub points back here, so it must be resolvable from the scraper).

authenticate=false and ssl=false expose JMX unauthenticated on the network. Use them only for a local trial. For production, keep authentication on (configure a jmxremote.password file and set otel.jmx.username/otel.jmx.password in the scraper config), enable TLS, and restrict access with firewall rules. See the Cassandra JMX security documentation.

Step 2: Configure and run the JMX Scraper

Configure the scraper's JMX connection in a properties file and its SigNoz destination via OTEL_* environment variables. Create scraper.properties:

scraper.properties
otel.jmx.service.url=service:jmx:rmi:///jndi/rmi://<cassandra-host>:7199/jmxrmi
otel.jmx.target.system=cassandra,jvm
otel.metric.export.interval=30s
# sets service.name so Cassandra telemetry is easy to filter from everything else in SigNoz
otel.service.name=cassandra

Setting otel.jmx.target.system to cassandra,jvm collects both Cassandra request and compaction metrics and the underlying JVM metrics (heap, threads, GC). Set <cassandra-host> to the address or service name the scraper uses to reach Cassandra's JMX port.

Pick your environment:

Download the scraper JAR and run it on any host with a JRE and network access to the JMX port:

curl -sL -O https://repo1.maven.org/maven2/io/opentelemetry/contrib/opentelemetry-jmx-scraper/1.57.0-alpha/opentelemetry-jmx-scraper-1.57.0-alpha.jar

export OTEL_METRICS_EXPORTER="otlp"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.<region>.signoz.cloud:443"
export OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=<your-ingestion-key>"

java -jar opentelemetry-jmx-scraper-1.57.0-alpha.jar -config scraper.properties

Verify these values:

For a long-running setup, wrap this in a systemd unit so the scraper restarts with the host.

Legacy: Collector jmxreceiver

The jmxreceiver (deprecated 2026-01-30) embeds the JMX Metric Gatherer JAR inside the Collector. It still works on a host that has a JRE. Download a gatherer JAR version your Collector accepts from Maven Central (on a jar hash does not match known versions error, the Collector logs the versions it accepts), then add the receiver:

cassandra-metrics-collection-config.yaml
receivers:
  jmx/cassandra:
    jar_path: /opt/opentelemetry-java-contrib-jmx-metrics.jar
    endpoint: <cassandra-host>:7199
    target_system: cassandra,jvm
    collection_interval: 30s

processors:
  resource/cassandra:
    attributes:
      - key: service.name
        value: cassandra
        action: upsert

exporters:
  # On collectors older than v0.144.0 use the otlphttp alias
  otlp_http/cassandra:
    endpoint: "https://ingest.<region>.signoz.cloud:443"
    headers:
      "signoz-ingestion-key": "<your-ingestion-key>"

service:
  pipelines:
    metrics/cassandra:
      receivers: [jmx/cassandra]
      processors: [resource/cassandra]
      exporters: [otlp_http/cassandra]

Verify these values:

Then start the Collector with --config cassandra-metrics-collection-config.yaml.

Validate

After you start the scraper and the Collector, confirm each signal arrives.

  1. Check the JMX Scraper logs for JMX scraping started.
  2. Metrics: Open Metrics in SigNoz and search for metrics starting with cassandra. (for example cassandra.client.request.error.count) and jvm..
  3. Logs: Open the Logs explorer and add filter service.name = cassandra.
  4. Traces: Open the Traces explorer and filter on your instrumented service to find Cassandra query spans.
Cassandra metrics in SigNoz Metrics
Cassandra metrics in SigNoz, filtered by service.name = cassandra
Cassandra in SigNoz Logs explorer
Cassandra logs in SigNoz, filtered by service.name = cassandra

Troubleshooting

JMX scraper logs Connection refused, or no cassandra.* metrics appear

  • Confirm Cassandra started with LOCAL_JMX=no and JMX listening on port 7199.
  • Confirm the scraper host reaches <cassandra-host>:7199 (check firewalls and security groups).
  • Set java.rmi.server.hostname on Cassandra to an address the scraper can resolve; the RMI stub points there.
  • If JMX authentication is on, set otel.jmx.username and otel.jmx.password in scraper.properties.

Scraper connects but no data reaches SigNoz

  • Read the scraper logs after JMX scraping started for export errors.
  • Verify OTEL_EXPORTER_OTLP_ENDPOINT, the signoz-ingestion-key value, and OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf.

Logs arrive but timestamps fail to parse

  • Cassandra 4.x writes a space date/time separator. Change the timestamp layout to 2006-01-02 15:04:05,000 (see the note under the logs config).

Legacy jmxreceiver: jar hash does not match known versions

  • Download a JMX Metric Gatherer JAR version your Collector accepts; the Collector logs the supported versions.

Next Steps

Get Help

If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack.

If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.

Last updated: June 5, 2026

Edit on GitHub

Was this page helpful?

Your response helps us improve this page.