Cassandra monitoring integration

Access to this feature depends on your subscription level. Requires Infrastructure Pro.

New Relic Infrastructure includes a Cassandra integration that instruments your Cassandra database. This document explains how to install and activate the Cassandra integration, and describes the data the integration collects.

Compatibility and requirements

To use the Cassandra integration, ensure your system meets these requirements:

Install and activate

On-host integrations do not automatically update. For best results, you should occasionally update the integration package and update the Infrastructure agent.

To install the Cassandra integration:

  1. Follow the instructions for installing an integration, using the file name nri-cassandra.

  2. Via the command line, change the directory to the integration's folder:

    cd /etc/newrelic-infra/integrations.d
  3. Create a copy of the sample configuration file by running:

    sudo cp cassandra-config.yml.sample cassandra-config.yml
  4. Edit the configuration file cassandra-config.yml as described in Configuration.
  5. Restart the Infrastructure agent.

Configuration

An integration's config file is where you put required login credentials and configure how data is collected. Config file commands include:

  • metrics: Captures the metrics for a particular Cassandra node, including required login info. Accepted arguments:
    • hostname: The Cassandra node hostname.
    • port: The port where Cassandra is listening and exposing metrics and variables via JMX.
    • username: The username to connect to Cassandra via JMX.
    • password: The password to connect to Cassandra via JMX.
    • timeout: Request for timeout in milliseconds.
  • inventory: Captures the configuration parameters set in the Cassandra config file as inventory data. Accepts the config_path argument, which gives the path to the Cassandra config file. To disable the collection of inventory data, delete the inventory command.
  • labels: The env label controls the environment attribute in Insights. The default value is production.

For general information about integration config file structure, see the SDK documentation.

Find and use data

To find your integration data in Infrastructure, go to infrastructure.newrelic.com > Integrations > On-host integrations and select one of the Cassandra integration links.

In New Relic Insights, data is attached to the CassandraSample and CassandraColumnFamilySample event types.

For more on how to find and use your integration data, see Understand and use data.

screen-cassandra-dashboard.png
infrastructure.newrelic.com > Integrations > On-host integrations > Cassandra > Cassandra dashboard: The Cassandra integration includes a default dashboard summarizing your Cassandra performance.

Metric data

The Cassandra integration collects the following metrics:

In Insights, Cassandra node metrics are attached to the CassandraSample event type. The Cassandra integration collects these node metrics:

Name Description
db.allMemtablesOffHeapSizeBytes Total amount of bytes stored in the memtables (2i and pending flush memtables included) that resides on-heap.
db.allMemtablesOnHeapSizeBytes Total amount of bytes stored in the memtables (2i and pending flush memtables included) that resides off-heap.
db.commitLogCompletedTasksPerSecond The number of commit log messages written per second.
db.commitLogPendindTasks Number of commit log messages written but yet to be fsync’ed.
db.commitLogTotalSizeBytes Current size, in bytes, used by all the commit log segments.
db.droppedRequestTypeMessagesPerSecond Dropped messages per second for this type of request. RequestType can be any of the following: BatchRemove, BatchStore, CounterMutation, Hint, Mutation, PagedRange, RangeSlice, Read, ReadRepair, RequestResponse, or Trace.
db.keyCacheCapacityBytes Key cache capacity in bytes.
db.keyCacheHitRate One-minute key cache hit rate.
db.keyCacheHitsPerSecond Number of key cache hits per second.
db.keyCacheRequestsPerSecond Number of requests to the key cache per second.
db.keyCacheSizeBytes Size of occupied cache in bytes.
db.liveSSTableCount Number of SSTables on disk for this column family.
db.loadBytes Size, in bytes, of the on disk data size this node manages.
db.rowCacheCapacityBytes Row cache capacity in bytes.
db.rowCacheHitRate One-minute row cache hit rate.
db.rowCacheHitsPerSecond Number of row cache hits per second.
db.rowCacheRequestsPerSecond Number of requests to the row cache per second.
db.rowCacheSizeBytes Total size of occupied row cache, in bytes.
db.threadpool.poolActiveTasks Number of tasks being actively worked on by this pool. pool ​can be one of the following:
  • internalAntiEntropyStage
  • internalCacheCleanupExecutor
  • internalCompactionExecutor
  • internalGossipStage
  • internalHintsDispatcher
  • internalInternalResponseStage
  • internalMemtableFlushWriter
  • internalMemtablePostFlush
  • internalMemtableReclaimMemory
  • internalMigrationStage
  • internalMiscStage
  • internalPendingRangeCalculator
  • internalSampler
  • internalSecondaryIndexManagement
  • internalValidationExecutor
  • requestCounterMutationStage
  • requestMutationStage
  • requestReadRepairStage
  • requestReadStage
  • requestRequestResponse
  • requestViewMutationStage
db.threadpool.pool.PendingTasks Number of tasks being actively worked on by this pool. pool can be any of the items in the list provided in the description of db.threadpool.poolActiveTasks.
db.totalHintsInProgress Number of hints currently attempting to be sent.
db.totalHintsPerSecond Number of hint messages per second written to this node. Includes one entry for each host to be hinted per hint.
query.CASReadRequestsPerSecond Transaction read latency in requests per second.
query.CASWriteRequestsPerSecond Transaction write latency in requests per second.
query.rangeSliceRequestsPerSecond Number of range slice requests per second.
query.rangeSliceTimeoutsPerSecond Number of timeouts encountered per second when processing token range read requests.
query.rangeSliceUnavailablesPerSecond Number of unavailable exceptions encountered per second when processing token range read requests.
query.readLatency50thPercentileMilliseconds Read latency in milliseconds, 50th percentile.
query.readLatency75thPercentileMilliseconds Read latency in milliseconds, 75th percentile.
query.readLatency95thPercentileMilliseconds Read latency in milliseconds, 95th percentile.
query.readLatency98thPercentileMilliseconds Read latency in milliseconds, 98th percentile.
query.readLatency999thPercentileMilliseconds Read latency in milliseconds, 999th percentile.
query.readLatency99thPercentileMilliseconds Read latency in milliseconds, 99th percentile.
query.readRequestsPerSecond Number of read requests per second.
query.readTimeoutsPerSecond Number of timeouts encountered per second when processing standard read requests.
query.readUnavailablesPerSecond Number of unavailable exceptions encountered per second when processing standard read requests.
query.viewWriteRequestsPerSecond Number of view write requests per second.
query.writeLatency50thPercentileMilliseconds Write latency in milliseconds, 50th percentile.
query.writeLatency75thPercentileMilliseconds Write latency in milliseconds, 75th percentile.
query.writeLatency95thPercentileMilliseconds Write latency in milliseconds, 95th percentile.
query.writeLatency98thPercentileMilliseconds Write latency in milliseconds, 98th percentile.
query.writeLatency999thPercentileMilliseconds Write latency in milliseconds, 999th percentile.
query.writeLatency99thPercentileMilliseconds Write latency in milliseconds, 99th percentile.
query.writeRequestsPerSecond Number of write requests per second.
query.writeTimeoutsPerSecond Number of timeouts encountered per second when processing regular write requests.
query.writeUnavailablesPerSecond Number of unavailable exceptions encountered per second when processing regular write requests.

The Cassandra integration retrieves column family metrics. Cassandra column family data is attached to the CassandraColumnFamilySample event type. It skips system keyspaces (system, system_auth, system_distributed, system_schema, system_traces and OpsCenter). To limit the performance impact, the integration will only capture metrics for a maximum of 20 column families.

The following metadata indicates the keyspace and column family associated with the sample metrics:

Name Description
db.columnFamily The Cassandra column family these metrics refer to.
db.keyspace The Cassandra keyspace that contains this column family.
db.keyspaceAndColumnFamily

The keyspace and column family in a single metadata attribute in the following format: keyspace.columnFamily.

The list of metrics below refer to the specific keyspace and column family specified in the metadata above:

Name Description
db.allMemtablesOffHeapSizeBytes Total number of bytes stored in the memtables (2i and pending flush memtables included) that resides off-heap.
db.allMemtablesOnHeapSizeBytes Total number of bytes stored in the memtables (2i and pending flush memtables included) that resides on-heap.
db.liveDiskSpaceUsedBytes Disk space in bytes used by SSTables belonging to this column family (in bytes).
db.liveSSTableCount Number of SSTables on disk for this column family.
db.pendingCompactions Estimate of number of pending compactions for this column family.
db.SSTablesPerRead50thPercentileMilliseconds Number of sstable data files accessed per read, 50th percentile.
db.SSTablesPerRead75thPercentileMilliseconds Number of sstable data files accessed per read, 75th percentile.
db.SSTablesPerRead95thPercentileMilliseconds Number of sstable data files accessed per read, 95th percentile.
db.SSTablesPerRead98thPercentileMilliseconds Number of sstable data files accessed per read, 98th percentile.
db.SSTablesPerRead999thPercentileMilliseconds Number of sstable data files accessed per read, 999th percentile.
db.SSTablesPerRead99thPercentileMilliseconds Number of sstable data files accessed per read, 99th percentile.
query.readLatency50thPercentileMilliseconds Local read latency in milliseconds for this column family, 50th percentile.
query.readLatency75thPercentileMilliseconds Local read latency in milliseconds for this column family, 75th percentile.
query.readLatency95thPercentileMilliseconds Local read latency in milliseconds for this column family, 95th percentile.
query.readLatency98thPercentileMilliseconds Local read latency in milliseconds for this column family, 98th percentile.
query.readLatency999thPercentileMilliseconds Local read latency in milliseconds for this column family, 999th percentile.
query.readLatency99thPercentileMilliseconds Local read latency in milliseconds for this column family, 99th percentile.
query.readRequestsPerSecond Number of read requests per second for this column family.
query.writeLatency50thPercentileMilliseconds Local write latency in milliseconds for this column family, 50th percentile.
query.writeLatency75thPercentileMilliseconds Local write latency in milliseconds for this column family, 75th percentile.
query.writeLatency95thPercentileMilliseconds Local write latency in milliseconds for this column family, 95th percentile.
query.writeLatency98thPercentileMilliseconds Local write latency in milliseconds for this column family, 98th percentile.
query.writeLatency999thPercentileMilliseconds Local write latency in milliseconds for this column family, 999th percentile.
query.writeLatency99thPercentileMilliseconds Local write latency in milliseconds for this column family, 99th percentile.
query.writeRequestsPerSecond Number of write requests per second for this column family.

Inventory

The integration captures configuration options defined in the Cassandra configuration and reports them as inventory data in the New Relic UI.

System metadata

The Cassandra integration also collects these attributes about the service and its configuration:

Name Description
software.version The Cassandra version.
cluster.name The name of the cluster this Cassandra node belongs to.

For more help

Recommendations for learning more: