This page describes the expanded metrics (CASSANDRA-4009) introduced in 1.2. New metrics have continued to be added since.
Apache Cassandra version 1.1 introduced metrics using Codahale's Metrics library. The library enables easier exposure of metrics and integration with other systems. What you can get from metrics are basically the same with 1.1 but reimplemented and put them in order using Metrics library. You can still query using old JMX paths, but they are deprecated and may be removed in future version.
As of version 1.2, Cassandra exposes following group of metrics.
In 2.0.2 (CASSANDRA-4430) introduced (optional) plugable reporting reporters using metrics-reporter-config. This can be used to send org.apache.cassandra.metrics to popular tools like ganglia and graphite for data collection and graphing. See conf/metrics-reporter-config-sample.yaml
for a sample. Metrics are always available in JMX regardless of this config. To enable a reporter:
metrics-ganglia
) to lib
.-Dcassandra.metricsReporterConfigFile=yourCoolFile.yaml
Cache metrics are created per cache type (key cache, row cache).
This section shows defined MetricName properties.
group |
org.apache.cassandra.metrics |
type |
Cache |
scope |
KeyCache or RowCache |
name |
name of metric |
This section shows JMX ObjectName for easy category.
org.apache.cassandra.metrics:type=Cache,scope=(Cache type),name=(Metric name) |
CapacityInBytes
: Cache capacity in bytes.
Hits
: Cache hit count.
HitRate
: Cache hit rate.
Requests
: Cache request count.
Size
: Cache size in bytes.
Metrics for read/range slice/write client request.
group |
org.apache.cassandra.metrics |
type |
ClientRequest |
scope |
Read or Write or RangeSlice |
name |
name of metric |
org.apache.cassandra.metrics:type=ClientRequest,scope=(Read|Write|RangeSlice),name=(Metric name) |
Latency
: Latency statistics.
TotalLatency
: Total latecy in micro seconds.
Timeouts
: Total number of timeout requests. More precisely, total number of TimeoutException thrown.
Unavailables
: Total number of unavailable requests. More precisely, total number of UnavailableException thrown.
ColumnFamily metrics are created per ColumnFamily.
group |
org.apache.cassandra.metrics |
type |
ColumnFamily or IndexColumnFamily |
scope |
(Keyspace name).(ColumnFamily name) |
name |
name of metric |
If ColumnFamily is for secondary index, then type will be IndexColumnFamily.
org.apache.cassandra.metrics:type=(ColumnFamily|IndexColumnFamily),keyspace=(Keyspace name),scope=(ColumnFamily Name),name=(Metric name) |
BloomFilterDiskSpaceUsed
: Disk space used by bloom filter.
BloomFilterFalsePositives
: Number of false positives for bloom filter.
BloomFilterFalseRatio
: False positive ratio of bloom filter.
CompressionRatio
: Current compression ratio for all SSTables.
EstimatedRowSizeHistogram
: Histogram of estimated row size (in bytes).
EstimatedColumnCountHistogram
: Histogram of estimated number of columns.
LiveDiskSpaceUsed
: Disk space used by 'live' SSTables.
LiveSSTableCount
: Number of 'livw' SSTables.
MaxRowSize
: Size of the largest compacted row.
MeanRowSize
: Mean size of compacted rows.
MemtableColumnsCount
: Total number of columns present in memtable.
MemtableDataSize
: Total amount of data stored in memtable, including column related overhead.
MemtableSwitchCount
: Number of times flushing has resulted in memtable being switched out.
MinRowSize
: Size of the smallest compacted row.
PendingTasks
: Estimated number of tasks pending.
ReadLatency
: Read latency statistics.
ReadTotalLatency
: Total latecy in micro seconds for reads.
RecentBloomFilterFalsePositives
: Number of false positives since last check.
RecentBloomFilterFalseRatio
: False positive ratio since last check.
SSTablesPerReadHistogram
: Histogram of the number of SSTables accessed per read.
TotalDiskSpaceUsed
: Total disk space used by SSTables including obsolete ones waiting to be GC'd.
WriteLatency
: Write latency statistics.
WriteTotalLatency
: Total latecy in micro seconds for writes.
group |
org.apache.cassandra.metrics |
type |
CommitLog |
name |
name of metric |
org.apache.cassandra.metrics:type=CommitLog,name=(Metric name) |
CompletedTasks
: Approximate number of completed task.
PendingTasks
: Approximate number of pending task.
TotalCommitLogSize
: Current data size of all commit log segments.
group |
org.apache.cassandra.metrics |
type |
Compaction |
name |
name of metric |
org.apache.cassandra.metrics:type=Compaction,name=(Metric name) |
CompletedTasks
: Estimated number of completed compaction tasks.
PendingTasks
: Estimated number of pending compaction tasks.
BytesCompacted
: Number of bytes compacted since node started.
TotalCompactionsCompleted
: Estimated number of completed compaction tasks.
group |
org.apache.cassandra.metrics |
type |
Connection |
scope |
IP address (if not global metrics) |
name |
name of metric |
org.apache.cassandra.metrics:type=Connection,name=(Metric name) |
org.apache.cassandra.metrics:type=Connection,scope=(IP address),name=(Metric name) |
TotalTimeouts
: Total number of timeouts occurred for this node.
CommandPendingTasks
: Number of messages to send.
CommandCompletedTasks
: Number of messages sent.
CommandDroppedTasks
: Number of messages dropped.
ResponsePendingTasks
: Number of messages to respond.
ResponseCompletedTasks
: Number of messages responded.
Timeout
: Number of timeouts occurred for this connection.
group |
org.apache.cassandra.metrics |
type |
DroppedMessage |
scope |
Verb of droppable message |
name |
name of metric |
org.apache.cassandra.metrics:type=DroppedMessage,scope=(Verb),name=(Metric name) |
Dropped
: Total number of dropped message for this verb.
group |
org.apache.cassandra.metrics |
type |
Streaming |
scope |
IP address (if not global metrics) |
name |
name of metric |
org.apache.cassandra.metrics:type=Streaming,name=(Metric name) |
org.apache.cassandra.metrics:type=Streaming,scope=(IP address),name=(Metric name) |
ActiveOutboundStreams
: Currently active outbound streams.
TotalIncomingBytes
: Total incoming bytes received since node started.
TotalOutgoingBytes
: Total outgoing bytes sent since node started.
IncomingBytes
: Incoming bytes received from specific node.
OutgoingBytes
: Outgoing bytes sent to specific node.
group |
org.apache.cassandra.metrics |
type |
Storage |
name |
name of metric |
org.apache.cassandra.metrics:type=Storage,name=(Metric name) |
Load
: Total disk space used (in bytes) for this node.
group |
org.apache.cassandra.metrics |
type |
ThreadPool |
scope |
(path).(Thread pool name) |
name |
name of metric |
(path) is either internal or request, based on the usage of thread pool.
org.apache.cassandra.metrics:type=ThreadPool,path=(type),scope=(Thread pool name),name=(Metric name) |
ActiveTasks
: Approximate number of tasks thread pool is actively executing.
CompletedTasks
: Approximate total number of tasks thread pool has completed execution.
CurrentlyBlockedTasks
: Number of currently blocked tasks.
PendingTasks
: Approximate number of pending tasks thread pool has.
TotalBlockedTasks
: Total number of blocked tasks since node start up.
https://c.statcounter.com/9397521/0/fe557aad/1/|stats