Monitor the OpenSearch integration
Use these tools to monitor the OpenSearch integration on a running node, including metrics and options for Grafana dashboards. For setup instructions, see Integrate OpenSearch with Hyper-Converged Database (HCD).
Index status
Use nodetool to check index status.
Example:
nodetool describecluster | grep INDEX_STATUS
Check the HCD logs for OpenSearch integration messages. Example:
grep -i "opensearch" /var/log/cassandra/system.log
Key log prefixes:
-
OpenSearchIndex: Index lifecycle events -
OpenSearchMutatorInterceptor: Write capture -
InProcessReplicatorService: Replication pipeline -
ContentSummary: Detailed write operation tracking
OpenSearch metrics
The OpenSearch integration provides metrics to help you monitor index lifecycle, replication performance, and storage state.
The metrics are categorized as:
-
Index lifecycle metrics
-
Replication performance metrics
-
Pending mutations storage metrics
All metrics use the following JMX path, where <metric> is the metric name prefixed with OS:
ObjectName: org.apache.cassandra.metrics:type=Table,keyspace=<ks>,scope=<table>,name=<metric>
The metrics are exposed through JMX, so any JMX-based tool can be used to monitor. Use JConsole, VisualVM, or any JMX monitoring tool to connect to HCD and view the metrics under:
org.apache.cassandra.metrics:type=OpenSearchIndex,*
org.apache.cassandra.metrics:type=OpenSearchReplicator,*
org.apache.cassandra.metrics:type=OpenSearchStorage,*
When you query metrics using the Prometheus-compatible endpoint provided by the HCD Management API agent, the agent rewrites metric names to lowercase with underscores.
For example, OSMutations becomes org_apache_cassandra_metrics_table_os_mutations.
Grafana dashboards
HCD bundles Grafana dashboard definitions for the OpenSearch metrics under src/main/grafana/.
Import them into a Grafana instance pointed at a Prometheus endpoint that scrapes the HCD Management API metrics endpoint to visualize index lifecycle, replication throughput, and storage state.
Index lifecycle metrics
ObjectName: org.apache.cassandra.metrics:type=Table,keyspace=<ks>,scope=<table>,name=<metric>
The index lifecycle counters, which are monotonic totals, for the given keyspace and table:
| Metric | Description |
|---|---|
|
Total initial builds started. |
|
Successful initial builds. |
|
Failed initial builds. |
|
Total rebuilds started. |
|
Successful rebuilds. |
|
Failed rebuilds. |
|
Index drops and invalidations. |
|
Total rows indexed. |
|
Rows skipped because this node is not the primary replica. |
|
Rows indexed from a remote datacenter. |
|
Remote rows skipped because this node is not the primary replica. |
|
Total batches submitted. |
|
Total items across all batches. |
|
Indexer operation errors. |
|
Primary replica check errors. |
The index lifecycle histograms, which show distributions, for the given keyspace and table:
| Metric | Description |
|---|---|
|
Initial build duration distribution. |
|
Rebuild duration distribution. |
|
Batch size distribution (rows per batch). |
The index lifecycle gauges, which show current state, for the given keyspace and table:
| Metric | Description |
|---|---|
|
Current index status: |
|
Whether a build is in progress ( |
|
Timestamp of last build completion (milliseconds since epoch). |
|
Timestamp of last error (milliseconds since epoch). |
The index lifecycle rate meters for the given keyspace and table:
| Metric | Description |
|---|---|
|
Rate of rows indexed (per second). |
|
Rate of batches submitted (per second). |
|
Rate of errors (per second). |
Replication performance metrics
ObjectName: org.apache.cassandra.metrics:type=Table,keyspace=<ks>,scope=<table>,name=<metric>
The replication performance counters, which are monotonic totals, for the given keyspace and table:
| Metric | Description |
|---|---|
|
Total mutations processed. |
|
Failed mutations. |
|
Mutations rejected due to storage backpressure. |
|
Out-of-order (late) mutations received. |
|
Mutations recovered from a logged batch. |
The replication performance histograms for the given keyspace and table:
| Metric | Description |
|---|---|
|
Coordinator write latency distribution (microseconds). |
The replication performance gauges, which show current state, for the given keyspace and table:
| Metric | Description |
|---|---|
|
Currently coordinating mutations. |
|
Operations pending in storage. |
|
Available storage capacity. |
Pending mutations storage metrics
ObjectName: org.apache.cassandra.metrics:type=Table,keyspace=<ks>,scope=<table>,name=<metric>
The pending mutations storage counters, which are monotonic totals, for the given keyspace and table:
| Metric | Description |
|---|---|
|
Total mutation STARTs accepted and appended to the commit log. |
|
Total mutation COMPLETEs appended (pending entries cleared). |
|
Total mutations rejected because the store was full (sum of all rejection reasons). |
|
Mutations rejected due to per-table or shared disk budget exhaustion (subset of |
|
Memtable spills to data segments. |
|
Commit-log segment rolls (new |
|
Group-commit fsyncs issued ( |
|
Checkpoints completed (log compacted and truncated). |
|
Mutations replayed from the commit log at store open. |
The pending mutations storage histograms and gauges for the given keyspace and table:
| Metric | Description |
|---|---|
|
Distribution of records spilled per memtable flush. |
|
Current number of pending mutations in the store. |
|
Approximate bytes of in-memtable payloads currently held in heap. |
|
Bytes currently held on disk (commit logs and data segments). |
Inspect and manage MBeans with nodetool sjk
Use the JMX beans exported by the replicator to investigate the internal status of the replicator, query pending mutations, and perform administrative operations.
You can use nodetool sjk to query and manage these MBeans directly from the command line:
BEAN='com.datastax.opensearch.index:type=PendingMutationsStorage,keyspace=KEYSPACE,table=TABLE'
# Get the number of pending mutations
nodetool sjk mx -mg -b "$BEAN" -f PendingCount
# Read the pending-mutations cap
nodetool sjk mx -mg -b "$BEAN" -f MaxPendingCount
# Change the pending-mutations cap at runtime (not persisted — lost on restart)
nodetool sjk mx -ms -b "$BEAN" -f MaxPendingCount -v 200000
# List pending operations (LSN + primary key)
nodetool sjk mx -mc -b "$BEAN" -op listPendingMutations
# Acknowledge a single LSN
nodetool sjk mx -mc -b "$BEAN" -op acknowledge -a 7:42
# Acknowledge multiple LSNs (repeat -a for each element)
nodetool sjk mx -mc -b "$BEAN" -op acknowledge -a 7:42 -a 7:43 -a 8:0
# Acknowledge all pending mutations (clear all pending items)
nodetool sjk mx -mc -b "$BEAN" -op acknowledgeAll
# Force a checkpoint
nodetool sjk mx -mc -b "$BEAN" -op checkpoint
# Describe the MBean (attributes and operations)
nodetool sjk mx -mi -b "$BEAN"