Skip to main content
As part of normal operation, CockroachDB continuously records metrics that track performance, latency, usage, and many other runtime indicators. These metrics are often useful in diagnosing problems, troubleshooting performance, or planning cluster infrastructure modifications. This page documents locations where metrics are exposed for analysis.

Available metrics

NameDescription
addsstable.applicationsNumber of SSTable ingestions applied (i.e., applied by Replicas)
addsstable.copiesNumber of SSTable ingestions that required copying files during application
addsstable.proposalsNumber of SSTable ingestions proposed (i.e., sent to Raft by lease holders)
build.timestampBuild information
capacity.availableAvailable storage capacity
capacity.reservedCapacity reserved for snapshots
capacity.usedUsed storage capacity
capacityTotal storage capacity
changefeed.aggregator_progressThe earliest timestamp up to which any aggregator is guaranteed to have emitted all values for which it is responsible. Note: This metric may regress when a changefeed restarts due to a transient error. Consider tracking the changefeed.checkpoint_progress metric, which will not regress.
changefeed.checkpoint_progressThe earliest timestamp of any changefeed’s persisted checkpoint (values prior to this timestamp will never need to be re-emitted).
changefeed.failuresTotal number of changefeed jobs which have failed.
changefeed.lagging_rangesNumber of ranges which are behind in a changefeed. This is calculated based on the changefeed options:
changefeed.runningNumber of currently running changefeeds, including sinkless.
clock-offset.meannanosMean clock offset with other nodes in nanoseconds
clock-offset.stddevnanosStd dev clock offset with other nodes in nanoseconds
cluster.preserve-downgrade-option.last-updatedUnix timestamp of last updated time for cluster.preserve_downgrade_option
compactor.compactingnanosNumber of nanoseconds spent compacting ranges
compactor.compactions.failureNumber of failed compaction requests sent to the storage engine
compactor.compactions.successNumber of successful compaction requests sent to the storage engine
compactor.suggestionbytes.compactedNumber of logical bytes compacted from suggested compactions
compactor.suggestionbytes.queuedNumber of logical bytes in suggested compactions in the queue
compactor.suggestionbytes.skippedNumber of logical bytes in suggested compactions which were not compacted
distsender.batches.partialNumber of partial batches processed
distsender.batchesNumber of batches processed
distsender.errors.notleaseholderNumber of NotLeaseHolderErrors encountered
distsender.rpc.sent.localNumber of local RPCs sent
distsender.rpc.sent.nextreplicaerrorNumber of RPCs sent due to per-replica errors
distsender.rpc.sentNumber of RPCs sent
exec.errorNumber of batch KV requests that failed to execute on this node
exec.latencyLatency in nanoseconds of batch KV requests executed on this node
exec.successNumber of batch KV requests executed successfully on this node
gcbytesageCumulative age of non-live data in seconds
gossip.bytes.receivedNumber of received gossip bytes
gossip.bytes.sentNumber of sent gossip bytes
gossip.connections.incomingNumber of active incoming gossip connections
gossip.connections.outgoingNumber of active outgoing gossip connections
gossip.connections.refusedNumber of refused incoming gossip connections
gossip.infos.receivedNumber of received gossip Info objects
gossip.infos.sentNumber of sent gossip Info objects
intentageCumulative age of intents in seconds
intentbytesNumber of bytes in intent KV pairs
intentcountCount of intent keys
jobs.changefeed.expired_pts_recordsNumber of expired protected timestamp records owned by changefeed jobs.
jobs.{job_type}.currently_pausedNumber of {job_type} jobs currently considered paused. See the /_status/vars endpoint for all job types.
jobs.{job_type}.protected_age_secThe age of the oldest protected timestamp record protecting {job_type} jobs. See the /_status/vars endpoint for all job types.
jobs.{job_type}.protected_record_countNumber of protected timestamp records held by {job_type} jobs. See the /_status/vars endpoint for all job types.
jobs.row_level_ttl.num_active_spansNumber of active spans the TTL job is deleting from
jobs.row_level_ttl.span_total_durationDuration for processing a span during row level TTL
keybytesNumber of bytes taken up by keys
keycountCount of all keys
lastupdatenanosTime in nanoseconds since Unix epoch at which bytes/keys/intents metrics were last updated
leases.epochNumber of replica leaseholders using epoch-based leases
leases.errorNumber of failed lease requests
leases.expirationNumber of replica leaseholders using expiration-based leases
leases.successNumber of successful lease requests
leases.transfers.errorNumber of failed lease transfers
leases.transfers.successNumber of successful lease transfers
livebytesNumber of bytes of live data (keys plus values), including unreplicated data
livecountCount of live keys
liveness.epochincrementsNumber of times this node has incremented its liveness epoch
liveness.heartbeatfailuresNumber of failed node liveness heartbeats from this node
liveness.heartbeatlatencyNode liveness heartbeat latency in nanoseconds
liveness.heartbeatsuccessesNumber of successful node liveness heartbeats from this node
liveness.livenodesNumber of live nodes in the cluster (will be 0 if this node is not itself live)
node-idnode ID with labels for advertised RPC and HTTP addresses
queue.consistency.pendingNumber of pending replicas in the consistency checker queue
queue.consistency.process.failureNumber of replicas which failed processing in the consistency checker queue
queue.consistency.process.successNumber of replicas successfully processed by the consistency checker queue
queue.consistency.processingnanosNanoseconds spent processing replicas in the consistency checker queue
queue.gc.info.abortspanconsideredNumber of AbortSpan entries eligible for removal based on their ages
queue.gc.info.abortspangcnumNumber of AbortSpan entries fit for removal
queue.gc.info.abortspanscannedNumber of transactions present in the AbortSpan scanned from the engine
queue.gc.info.clearrangefailedNumber of failed ClearRange operations during GC
queue.gc.info.clearrangesuccessNumber of successful ClearRange operations during GC
queue.gc.info.intentsconsideredNumber of intents eligible to be considered because they are at least two hours old
queue.gc.info.intenttxnsNumber of associated distinct transactions
queue.gc.info.numkeysaffectedNumber of keys with GC’able data
queue.gc.info.pushtxnNumber of attempted pushes
queue.gc.info.resolvesuccessNumber of successful intent resolutions
queue.gc.info.resolvetotalNumber of attempted intent resolutions
queue.gc.info.transactionspangcabortedNumber of GC’able entries corresponding to aborted txns
queue.gc.info.transactionspangccommittedNumber of GC’able entries corresponding to committed txns
queue.gc.info.transactionspangcpendingNumber of GC’able entries corresponding to pending txns
queue.gc.info.transactionspanscannedNumber of entries in transaction spans scanned from the engine
queue.gc.pendingNumber of pending replicas in the GC queue
queue.gc.process.failureNumber of replicas which failed processing in the GC queue
queue.gc.process.successNumber of replicas successfully processed by the GC queue
queue.gc.processingnanosNanoseconds spent processing replicas in the GC queue
queue.raftlog.pendingNumber of pending replicas in the Raft log queue
queue.raftlog.process.failureNumber of replicas which failed processing in the Raft log queue
queue.raftlog.process.successNumber of replicas successfully processed by the Raft log queue
queue.raftlog.processingnanosNanoseconds spent processing replicas in the Raft log queue
queue.raftsnapshot.pendingNumber of pending replicas in the Raft repair queue
queue.raftsnapshot.process.failureNumber of replicas which failed processing in the Raft repair queue
queue.raftsnapshot.process.successNumber of replicas successfully processed by the Raft repair queue
queue.raftsnapshot.processingnanosNanoseconds spent processing replicas in the Raft repair queue
queue.replicagc.pendingNumber of pending replicas in the replica GC queue
queue.replicagc.process.failureNumber of replicas which failed processing in the replica GC queue
queue.replicagc.process.successNumber of replicas successfully processed by the replica GC queue
queue.replicagc.processingnanosNanoseconds spent processing replicas in the replica GC queue
queue.replicagc.removereplicaNumber of replica removals attempted by the replica gc queue
queue.replicate.addreplicaNumber of replica additions attempted by the replicate queue
queue.replicate.addreplica.errorNumber of failed replica additions processed by the replicate queue
queue.replicate.addreplica.successNumber of successful replica additions processed by the replicate queue
queue.replicate.pendingNumber of pending replicas in the replicate queue
queue.replicate.process.failureNumber of replicas which failed processing in the replicate queue
queue.replicate.process.successNumber of replicas successfully processed by the replicate queue
queue.replicate.processingnanosNanoseconds spent processing replicas in the replicate queue
queue.replicate.purgatoryNumber of replicas in the replicate queue’s purgatory, awaiting allocation options
queue.replicate.rebalancereplicaNumber of replica rebalancer-initiated additions attempted by the replicate queue
queue.replicate.removedeadreplicaNumber of dead replica removals attempted by the replicate queue (typically in response to a node outage)
queue.replicate.removedeadreplica.errorNumber of failed dead replica removals processed by the replicate queue
queue.replicate.removedeadreplica.successNumber of successful dead replica removals processed by the replicate queue
queue.replicate.removedecommissioningreplica.errorNumber of failed decommissioning replica removals processed by the replicate queue
queue.replicate.removedecommissioningreplica.successNumber of successful decommissioning replica removals processed by the replicate queue
queue.replicate.removereplicaNumber of replica removals attempted by the replicate queue (typically in response to a rebalancer-initiated addition)
queue.replicate.removereplica.errorNumber of failed replica removals processed by the replicate queue
queue.replicate.removereplica.successNumber of successful replica removals processed by the replicate queue
queue.replicate.replacedeadreplica.errorNumber of failed dead replica replacements processed by the replicate queue
queue.replicate.replacedeadreplica.successNumber of successful dead replica replacements processed by the replicate queue
queue.replicate.replacedecommissioningreplica.errorNumber of failed decommissioning replica replacements processed by the replicate queue
queue.replicate.replacedecommissioningreplica.successNumber of successful decommissioning replica replacements processed by the replicate queue
queue.replicate.transferleaseNumber of range lease transfers attempted by the replicate queue
queue.split.pendingNumber of pending replicas in the split queue
queue.split.process.failureNumber of replicas which failed processing in the split queue
queue.split.process.successNumber of replicas successfully processed by the split queue
queue.split.processingnanosNanoseconds spent processing replicas in the split queue
queue.tsmaintenance.pendingNumber of pending replicas in the time series maintenance queue
queue.tsmaintenance.process.failureNumber of replicas which failed processing in the time series maintenance queue
queue.tsmaintenance.process.successNumber of replicas successfully processed by the time series maintenance queue
queue.tsmaintenance.processingnanosNanoseconds spent processing replicas in the time series maintenance queue
raft.commandsappliedCount of Raft commands applied
raft.enqueued.pendingNumber of pending outgoing messages in the Raft Transport queue
raft.heartbeats.pendingNumber of pending heartbeats and responses waiting to be coalesced
raft.process.commandcommit.latencyLatency histogram in nanoseconds for committing Raft commands
raft.process.logcommit.latencyLatency histogram in nanoseconds for committing Raft log entries
raft.process.tickingnanosNanoseconds spent in store.processRaft() processing replica.Tick()
raft.process.workingnanosNanoseconds spent in store.processRaft() working
raft.rcvd.appNumber of MsgApp messages received by this store
raft.rcvd.apprespNumber of MsgAppResp messages received by this store
raft.rcvd.droppedNumber of dropped incoming Raft messages
raft.rcvd.heartbeatNumber of (coalesced, if enabled) MsgHeartbeat messages received by this store
raft.rcvd.heartbeatrespNumber of (coalesced, if enabled) MsgHeartbeatResp messages received by this store
raft.rcvd.prevoteNumber of MsgPreVote messages received by this store
raft.rcvd.prevoterespNumber of MsgPreVoteResp messages received by this store
raft.rcvd.propNumber of MsgProp messages received by this store
raft.rcvd.snapNumber of MsgSnap messages received by this store
raft.rcvd.timeoutnowNumber of MsgTimeoutNow messages received by this store
raft.rcvd.transferleaderNumber of MsgTransferLeader messages received by this store
raft.rcvd.voteNumber of MsgVote messages received by this store
raft.rcvd.voterespNumber of MsgVoteResp messages received by this store
raft.ticksNumber of Raft ticks queued
raftlog.behindNumber of Raft log entries followers on other stores are behind
raftlog.truncatedNumber of Raft log entries truncated
range.addsNumber of range additions
range.raftleadertransfersNumber of Raft leader transfers
range.removesNumber of range removals
range.snapshots.recv-in-progressNumber of non-empty snapshots in progress on a receiver store
range.snapshots.recv-queueNumber of queued non-empty snapshots on a receiver store
range.snapshots.recv-total-in-progressNumber of empty and non-empty snapshots in progress on a receiver store
range.snapshots.send-in-progressNumber of non-empty snapshots in progress on a sender store
range.snapshots.send-queueNumber of queued non-empty snapshots on a sender store
range.snapshots.send-total-in-progressNumber of empty and non-empty in-progress snapshots on a sender store
range.snapshots.generatedNumber of generated snapshots
range.snapshots.normal-appliedNumber of applied snapshots
range.snapshots.preemptive-appliedNumber of applied preemptive snapshots
range.snapshots.rcvd-bytesNumber of snapshot bytes received
range.snapshots.rebalancing.rcvd-bytesNumber of rebalancing snapshot bytes received
range.snapshots.rebalancing.sent-bytesNumber of rebalancing snapshot bytes sent
range.snapshots.recovery.rcvd-bytesNumber of recovery snapshot bytes received
range.snapshots.recovery.sent-bytesNumber of recovery snapshot bytes sent
range.snapshots.recv-in-progressNumber of non-empty snapshots being received
range.snapshots.recv-queueNumber of snapshots queued to receive
range.snapshots.recv-total-in-progressNumber of total snapshots being received
range.snapshots.send-in-progressNumber of non-empty snapshots being sent
range.snapshots.send-queueNumber of snapshots queued to send
range.snapshots.send-total-in-progressNumber of total snapshots being sent
range.snapshots.sent-bytesNumber of snapshot bytes sent
range.snapshots.unknown.rcvd-bytesNumber of unknown snapshot bytes received
range.snapshots.unknown.sent-bytesNumber of unknown snapshot bytes sent
range.splitsNumber of range splits
rangekeybytesNumber of bytes taken up by range keys (e.g., MVCC range tombstones)
rangekeycountCount of all range keys (e.g., MVCC range tombstones)
ranges.unavailableNumber of ranges with fewer live replicas than needed for quorum
ranges.underreplicatedNumber of ranges with fewer live replicas than the replication target
rangesNumber of ranges
rangevalbytesNumber of bytes taken up by range key values (e.g., MVCC range tombstones)
rangevalcountCount of all range key values (e.g., MVCC range tombstones)
rebalancing.queriespersecondNumber of kv-level requests received per second by the store, considering the last 30 minutes, as used in rebalancing decisions.
rebalancing.readbytespersecondNumber of bytes written per second, considering the last 30 minutes.
rebalancing.readspersecondNumber of keys read recently per second, considering the last 30 minutes.
rebalancing.requestspersecondNumber of requests received recently per second, considering the last 30 minutes.
rebalancing.writebytespersecondNumber of bytes read recently per second, considering the last 30 minutes.
rebalancing.writespersecondNumber of keys written (i.e. applied by Raft) per second to the store, considering the last 30 minutes.
replicas.commandqueue.combinedqueuesizeNumber of commands in all CommandQueues combined
replicas.commandqueue.combinedreadcountNumber of read-only commands in all CommandQueues combined
replicas.commandqueue.combinedwritecountNumber of read-write commands in all CommandQueues combined
replicas.commandqueue.maxoverlapsLargest number of overlapping commands seen when adding to any CommandQueue
replicas.commandqueue.maxreadcountLargest number of read-only commands in any CommandQueue
replicas.commandqueue.maxsizeLargest number of commands in any CommandQueue
replicas.commandqueue.maxtreesizeLargest number of intervals in any CommandQueue’s interval tree
replicas.commandqueue.maxwritecountLargest number of read-write commands in any CommandQueue
replicas.leaders_invalid_leaseNumber of replicas that are Raft leaders whose lease is invalid
replicas.leaders_not_leaseholdersNumber of replicas that are Raft leaders whose range lease is held by another store
replicas.leadersNumber of Raft leaders
replicas.leaseholdersNumber of lease holders
replicas.quiescentNumber of quiesced replicas
replicas.reservedNumber of replicas reserved for snapshots
replicasNumber of replicas
requests.backpressure.splitNumber of backpressured writes waiting on a Range split
requests.slow.commandqueueNumber of requests that have been stuck for a long time in the command queue
requests.slow.distsenderNumber of requests that have been stuck for a long time in the dist sender
requests.slow.leaseNumber of requests that have been stuck for a long time acquiring a lease
requests.slow.raftNumber of requests that have been stuck for a long time in Raft
rocksdb.block.cache.hitsCount of block cache hits
rocksdb.block.cache.missesCount of block cache misses
rocksdb.block.cache.pinned-usageBytes pinned by the block cache
rocksdb.block.cache.usageBytes used by the block cache
rocksdb.bloom.filter.prefix.checkedNumber of times the bloom filter was checked
rocksdb.bloom.filter.prefix.usefulNumber of times the bloom filter helped avoid iterator creation
rocksdb.compactionsNumber of table compactions
rocksdb.flushesNumber of table flushes
rocksdb.memtable.total-sizeCurrent size of memtable in bytes
rocksdb.num-sstablesNumber of storage engine SSTables
rocksdb.read-amplificationNumber of disk reads per query
rocksdb.table-readers-mem-estimateMemory used by index and filter blocks
round-trip-latencyDistribution of round-trip latencies with other nodes in nanoseconds
security.certificate.expiration.caExpiration timestamp in seconds since Unix epoch for the CA certificate. 0 means no certificate or error.
security.certificate.expiration.nodeExpiration timestamp in seconds since Unix epoch for the node certificate. 0 means no certificate or error.
schedules.BACKUP.protected_age_secThe age of the oldest protected timestamp record protected by BACKUP schedules.
schedules.BACKUP.protected_record_countNumber of protected timestamp records held by BACKUP schedules.
sql.bytesinNumber of SQL bytes received
sql.bytesoutNumber of SQL bytes sent
sql.connsNumber of active SQL connections. For new recent connections, refer to sql.new_conns.
sql.ddl.countNumber of SQL DDL statements
sql.delete.countNumber of SQL DELETE statements
sql.distsql.exec.latencyLatency in nanoseconds of SQL statement executions running on the distributed execution engine. This metric does not include the time to parse and plan the statement.
sql.distsql.flows.activeNumber of distributed SQL flows currently active
sql.distsql.flows.totalNumber of distributed SQL flows executed
sql.distsql.queries.activeNumber of distributed SQL queries currently active
sql.distsql.queries.totalNumber of distributed SQL queries executed
sql.distsql.select.countNumber of DistSQL SELECT statements
sql.distsql.service.latencyLatency in nanoseconds of SQL statement executions running on the distributed execution engine, including the time to parse and plan the statement.
sql.exec.latencyLatency in nanoseconds of all SQL statement executions. This metric does not include the time to parse and plan the statement.
sql.guardrails.max_row_size_err.countNumber of times a large row violates the corresponding sql.guardrails.max_row_size_err limit.
sql.guardrails.max_row_size_log.countNumber of times a large row violates the corresponding sql.guardrails.max_row_size_log limit.
sql.insert.countNumber of SQL INSERT statements
sql.mem.currentCurrent sql statement memory usage
sql.mem.distsql.currentCurrent sql statement memory usage for distsql
sql.mem.distsql.maxMemory usage per sql statement for distsql
sql.mem.maxMemory usage per sql statement
sql.mem.root.currentCurrent sql statement memory usage for root
sql.mem.root.maxMemory usage per sql statement for root
sql.mem.session.currentCurrent sql session memory usage
sql.mem.session.maxMemory usage per sql session
sql.mem.txn.currentCurrent sql transaction memory usage
sql.mem.txn.maxMemory usage per sql transaction
sql.misc.countNumber of other SQL statements
sql.new_connsNumber of new SQL connections in the previous second. For all connections, refer to sql.conns.
sql.pgwire_cancel.totalCounter of the number of pgwire query cancel requests
sql.pgwire_cancel.ignoredCounter of the number of pgwire query cancel requests that were ignored due to rate limiting
sql.pgwire_cancel.successfulCounter of the number of pgwire query cancel requests that were successful
sql.query.countNumber of SQL queries
sql.select.countNumber of SQL SELECT statements
sql.service.latencyLatency in nanoseconds of SQL request execution, including the time to parse and plan the statement.
sql.txn.abort.countNumber of SQL transaction ABORT statements
sql.txn.begin.countNumber of SQL transaction BEGIN statements
sql.txn.commit.countNumber of SQL transaction COMMIT statements
sql.txn.contended.countNumber of SQL transactions that experienced contention
sql.txn.isolation.executed_at.read_committedNumber of times a READ COMMITTED transaction was executed.
sql.txn.isolation.upgraded_from.read_committedNumber of times a READ COMMITTED transaction was automatically upgraded to a stronger isolation level.
sql.txn.rollback.countNumber of SQL transaction ROLLBACK statements
sql.update.countNumber of SQL UPDATE statements
storage.l0-level-scoreCompaction score of level 0
storage.l1-level-scoreCompaction score of level 1
storage.l2-level-scoreCompaction score of level 2
storage.l3-level-scoreCompaction score of level 3
storage.l4-level-scoreCompaction score of level 4
storage.l5-level-scoreCompaction score of level 5
storage.l6-level-scoreCompaction score of level 6
storage.l0-level-sizeSize of the SSTables in level 0
storage.l1-level-sizeSize of the SSTables in level 1
storage.l2-level-sizeSize of the SSTables in level 2
storage.l3-level-sizeSize of the SSTables in level 3
storage.l4-level-sizeSize of the SSTables in level 4
storage.l5-level-sizeSize of the SSTables in level 5
storage.l6-level-sizeSize of the SSTables in level 6
storage.keys.range-key-set.countApproximate count of RangeKeySet internal keys across the storage engine.
storage.marked-for-compaction-filesCount of SSTables marked for compaction
sys.cgo.allocbytesCurrent bytes of memory allocated by cgo
sys.cgo.totalbytesTotal bytes of memory allocated by cgo, but not released
sys.cgocallsTotal number of cgo call
sys.cpu.sys.nsTotal system cpu time in nanoseconds
sys.cpu.sys.percentCurrent system cpu percentage
sys.cpu.user.nsTotal user cpu time in nanoseconds
sys.cpu.user.percentCurrent user cpu percentage
sys.fd.openProcess open file descriptors
sys.fd.softlimitProcess open FD soft limit
sys.gc.countTotal number of GC runs
sys.gc.pause.nsTotal GC pause in nanoseconds
sys.gc.pause.percentCurrent GC pause percentage
sys.go.allocbytesCurrent bytes of memory allocated by go
sys.go.totalbytesTotal bytes of memory allocated by go, but not released
sys.goroutinesCurrent number of goroutines
sys.rssCurrent process RSS
sys.uptimeProcess uptime in seconds
sysbytesNumber of bytes in system KV pairs
syscountCount of system KV pairs
timeseries.write.bytesTotal size in bytes of metric samples written to disk
timeseries.write.errorsTotal errors encountered while attempting to write metrics to disk
timeseries.write.samplesTotal number of metric samples written to disk
totalbytesTotal number of bytes taken up by keys and values including non-live data
tscache.skl.read.pagesNumber of pages in the read timestamp cache
tscache.skl.read.rotationsNumber of page rotations in the read timestamp cache
tscache.skl.write.pagesNumber of pages in the write timestamp cache
tscache.skl.write.rotationsNumber of page rotations in the write timestamp cache
txn.abandonsNumber of abandoned KV transactions
txn.abortsNumber of aborted KV transactions
txn.autoretriesNumber of automatic retries to avoid serializable restarts
txn.commits1PCNumber of committed one-phase KV transactions
txn.commitsNumber of committed KV transactions (including 1PC)
txn.durationsKV transaction durations in nanoseconds
txn.restarts.deleterangeNumber of restarts due to a forwarded commit timestamp and a DeleteRange command
txn.restarts.possiblereplayNumber of restarts due to possible replays of command batches at the storage layer
txn.restarts.serializableNumber of restarts due to a forwarded commit timestamp and isolation=SERIALIZABLE
txn.restarts.writetoooldNumber of restarts due to a concurrent writer committing first
txn.restartsNumber of restarted KV transactions
valbytesNumber of bytes taken up by values
valcountCount of all values

See also