Apache Cassandra

Cassandra monitoring for low-latency clusters

by Obseria · Databases and messaging
  • OpenTelemetry
  • Infrastructure Observability
  • Databases and messaging
Category
Databases and messaging
Key metrics
10
Ready-made
5 dashboards & alerts
Setup
3 steps
Standard
OTLP

Run the OpenTelemetry JMX Metric Gatherer next to each node and Obseria shows client read and write latency, errors, pending compactions, hints, storage load and JVM heap for your whole Cassandra cluster.

Official OpenTelemetry mapping

The JMX Metric Gatherer from the OpenTelemetry project has a built-in cassandra target that turns Cassandra's JMX MBeans into OTLP metrics.

Latency percentiles per node

Read, write and range slice latency at p50, p99 and max show which node is slow and whether the slowdown is cluster-wide.

Cluster health in context

Obseria Intelligence relates rising client latency to compaction backlogs, hint build-up, GC pauses or host resources on the affected node.

Obseria interface

Obseria apps and capabilities: observability, APM, infrastructure and integrations
Obseria home dashboard with service health, open problems, SLO compliance and ingestion
Obseria trace explorer with span list and span attributes

Ready the moment data arrives

  • Cassandra cluster: read and write latency per node
  • Request rates and errors by operation
  • Alert on p99 read latency above threshold
  • Alert on growing pending compactions
  • Storage load and hints per node

What Obseria monitors in Apache Cassandra

Client requests

Read, write and range slice request counts and latency percentiles as seen by the coordinator.

Errors

Request errors by operation and status, such as timeouts and unavailable exceptions.

Compaction

Pending and completed compaction tasks per node.

Hinted handoff

Total hints and hints in progress, a sign of nodes that were down or overloaded.

Storage

Load on disk per node, to watch growth and balance across the ring.

JVM

Heap usage, garbage collection counts and time through the jvm target of the gatherer.

The Cassandra signals that matter

Obseria collects these values automatically and shows them in ready-made dashboards and alerts.

MetricUnitWhat it tells you
cassandra.client.request.read.latency.99pus99th percentile read latency at the coordinator, the key user-facing signal.
cassandra.client.request.write.latency.99pus99th percentile write latency at the coordinator.
cassandra.client.request.range_slice.latency.99pus99th percentile latency of range queries, which are often the most expensive.
cassandra.client.request.count1Client requests per operation; the rate gives reads and writes per second.
cassandra.client.request.error.count1Failed requests per operation and status, for example timeouts or unavailable.
cassandra.compaction.tasks.pending1Compaction tasks waiting to run; a growing backlog increases read latency.
cassandra.compaction.tasks.completed1Compaction tasks completed, to confirm compaction keeps up with writes.
cassandra.storage.load.countByData stored on the node's disk, to track growth and imbalance.
cassandra.storage.total_hints.count1Hints written for unavailable replicas; rising counts mean nodes miss writes.
jvm.memory.heap.usedByJVM heap in use per node, from the jvm target; high heap leads to long GC pauses.

Set up Cassandra monitoring in minutes

  1. 1

    Check JMX

    Cassandra exposes JMX on localhost:7199 by default; keep it bound to localhost and run the gatherer on the same host.

  2. 2

    Run the JMX Metric Gatherer

    Download opentelemetry-jmx-metrics.jar and start it with target system cassandra,jvm and a 30 second interval.

  3. 3

    Send to Obseria

    Set the OTLP exporter to your Obseria endpoint with your token as a URL-encoded header; node metrics appear within minutes.

Example configuration · BASH
# Cassandra exposes JMX on localhost:7199 by default.
# Run the OpenTelemetry JMX Metric Gatherer on the same host:
curl -L -o opentelemetry-jmx-metrics.jar \
  https://github.com/open-telemetry/opentelemetry-java-contrib/releases/latest/download/opentelemetry-jmx-metrics.jar

java -Dotel.jmx.service.url=service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi \
  -Dotel.jmx.target.system=cassandra,jvm \
  -Dotel.jmx.interval.milliseconds=30000 \
  -Dotel.metrics.exporter=otlp \
  -Dotel.exporter.otlp.endpoint=${OBSERIA_OTLP_ENDPOINT} \
  -Dotel.exporter.otlp.protocol=http/protobuf \
  -Dotel.exporter.otlp.headers=Authorization=Bearer%20${OBSERIA_TOKEN} \
  -jar opentelemetry-jmx-metrics.jar

Why Cassandra monitoring matters

Apache Cassandra is built for write-heavy workloads that must stay available across nodes and data centers: event stores, time series, messaging backends and user profiles. Its design spreads data across a ring of nodes and tolerates failures, which also means that problems often show up gradually. One node falls behind on compaction, another collects hints for a replica that was down, and read latency at the 99th percentile creeps up before anything fails. Cassandra monitoring makes these per-node signals visible and shows how they affect the latency your applications see.

Cassandra publishes its metrics through JMX. The OpenTelemetry Collector has no dedicated Cassandra receiver, but the OpenTelemetry project provides the JMX Metric Gatherer with a built-in cassandra target. It connects to the node's JMX port, maps the MBeans to metrics such as cassandra.client.request.read.latency.99p and exports them over OTLP. The Collector's jmx receiver can launch the same JAR if you prefer to manage it from a Collector configuration.

Signals that matter for Cassandra performance monitoring

  • Client latency: the read, write and range slice latency metrics at p50, p99 and max describe what the coordinator delivers to clients. p99 is usually the number to watch and to base SLOs on.
  • Throughput and errors: cassandra.client.request.count and cassandra.client.request.error.count per operation show load and failures such as timeouts or unavailable replicas.
  • Compaction: cassandra.compaction.tasks.pending reveals whether a node keeps up with merging SSTables; a growing backlog makes reads touch more files.
  • Hints: cassandra.storage.total_hints.count and hints in progress indicate replicas that missed writes because they were down or too slow.
  • Storage and JVM: cassandra.storage.load.count tracks data growth per node, and jvm.memory.heap.used with GC time explains pauses that stall requests.

Common Cassandra problems and how to detect them

Compaction backlog

Heavy write bursts or an unsuitable compaction strategy leave many SSTables per partition. Pending compactions rise, disk I/O increases and read latency at p99 follows.

GC pauses

Large partitions, wide rows or an oversized heap can cause long garbage collection pauses. During a pause the node does not respond, coordinators wait and client timeouts appear on otherwise healthy nodes.

Hint build-up

When a node is down or overloaded, other nodes store hints for it. A rising hint count shows which node misses writes and warns that a repair may be needed if the outage was long.

Unbalanced data

Poorly chosen partition keys put more data and traffic on some nodes. Storage load and request rates per node make hot spots visible.

Tombstone-heavy reads

Deletes and expiring data leave tombstones that reads must scan. Read latency that rises on specific tables while write latency stays flat is a typical pattern; compare it with your data model and TTL settings.

Best practices for Apache Cassandra monitoring

  1. Keep JMX bound to localhost and run the gatherer on each node; an open JMX port is a security risk.
  2. Include the jvm target next to cassandra so heap and GC metrics arrive with the same node attributes.
  3. Alert on p99 read and write latency and on pending compactions per node, not only on averages.
  4. Collect host metrics on every node as well, since disk and CPU limits often explain Cassandra latency.
  5. Instrument the services that use Cassandra with OpenTelemetry so slow queries show up as client spans in their traces.

How Obseria helps with Cassandra monitoring

Obseria receives Cassandra and JVM metrics over OTLP from the JMX Metric Gatherer and shows them next to host metrics and application traces. TopoGraph connects the cluster with the services that read and write it. When latency rises, Obseria Intelligence checks compaction, hints, GC and host resources on the affected nodes and presents the root cause with its chain of evidence. Dashboards, alerts and SLOs are included, and your data can stay in the EU region.

An SLO on p99 read latency turns the Cassandra metrics into a commitment to the teams that use the cluster. The error budget then shows whether maintenance, a repair or a data model change should take priority.

Learn more

Cassandra monitoring FAQ

There is no dedicated Cassandra receiver. The OpenTelemetry JMX Metric Gatherer has a built-in cassandra target and exports OTLP directly. The Collector's jmx receiver can run the same gatherer for you.

Usually not. Cassandra exposes JMX on localhost:7199 by default. Run the gatherer on the same host and keep JMX bound to localhost.

The OTLP header is passed as a Java system property, so the space after Bearer is written as %20.

The cassandra target reads the MBeans of Apache Cassandra. Distributions that keep these MBeans compatible usually work; ScyllaDB exposes metrics differently, typically via Prometheus, which Obseria can also ingest.

Yes. Run the gatherer as a sidecar container in each Cassandra pod so it can reach JMX on localhost, and let the Obseria Agent add pod and node metadata.

Start monitoring Cassandra today

Connect Cassandra in minutes with OpenTelemetry or the Obseria Agent. Free for 14 days.