Introduction
CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally, survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention. CockroachDB provides a familiar SQL API for structuring, manipulating, and querying data.
Supported Versions |
---|
2.1.6 or higher |
CockroachDB is a distributed SQL database built on a transactional and strongly consistent key-value store. Monitoring CockroachDB helps database administrators to:
- Minimize latency.
- Check database performance and availability.
- Tracking the health status of the database.
Prerequisites
- Install gateway version 5.0.0 or later.
- Map a suitable gateway management profile to a resource.
- Create credentials with type
HTTP
before assigning a template to a resource. The Port, Connection Time-out, and Is Secure values are not used to create credentials.
Discovery using the gateway
The administrator can deploy a gateway to support CockroachDB agentless monitoring. The gateway establishes a connection to the database using the management profile, collects metrics from the templates, and starts monitoring.
To monitor CockroachDB:
- Associate appropriate database credentials to the discovered database.
- Assign one or more database-specific global templates on the device.
Choose one of the following management mechanisms to discover CockroachDB servers and add them to your inventory:
WMI
SSH
SNMP
(Optional) Manually add a database server to the infrastructure inventory.
- Select Infrastructure.
- Click Settings > Resource > Add.
- From the Add Device window, enter the required details such as Device Type and Management Profile.
- Click Save.
View resource metrics
The gateway monitors the application using the assigned templates and displays the results in graphical format. To view resource metrics, click the desired Database Resource Name > Resource Details > Metrics.
Troubleshooting
If the graph is incorrect, verify that the resource is accessible and a telnet connection can be established:
ping <IPAddress>
telnet <IPAddress:Port>
Also verify that you are using the correct access credentials for the resource.
Supported templates
- CockroachDB Gossip I/O Statistics
- CockroachDB Queue Statistics
- CockroachDB Replica Statistics
- CockroachDB RocksDB Statistics
- CockroachDB SQL Statistics
- CockroachDB System Performance and Statistics
- CockroachDB Transaction Statistics
After selecting the templates, you can:
- Assign CockroachDB templates from Setup or at the device level.
- Customize default configuration parameter values while assigning the template.
Resource template configuration parameters
Configuration Parameter | Description |
---|---|
Connection Time-out | Maximum database connect time. The driver waits for the specified time before timing out due to connection failure. The default time is 15000 milliseconds(ms). |
Service Transport Type | The secure database end-point. The default type is In-secure. The connection is Secure when the data sent between the client and server is encrypted. |
CockroachDB API URL | The network connection to the CockroachDB cluster using the URL. Use the following format while connecting to the database: http/https>://${ipaddress}: |
Application Type | The application type value to identify the adapter. For example, COCKROACHDB. Do not change the default application type value. |
Supported metrics
Metric | Metric Display Name | Unit | Description |
---|---|---|---|
cockroachdb.addsstable.applications | CockrocachDB AddSSTable Applications | count | Number of SSTable ingestions applied |
cockroachdb.addsstable.copies | Cockroachdb Addsstable Copies | count | Number of SSTable ingestions that requires copying files during application |
cockroachdb.addsstable.proposals | Cockroachdb Addsstable Proposals | count | Number of SSTable ingestions proposed |
cockroachdb.capacity.available | Cockroachdb Capacity Available | bytes | Available storage capacity |
cockroachdb.capacity.reserved | Cockroachdb Capacity Reserved | bytes | Capacity reserved for snapshots |
cockroachdb.capacity.total | CockroachDB Total Capacity | bytes | Total storage capacity |
cockroachdb.capacity.used | Cockroachdb Capacity Used | bytes | Used storage capacity |
cockroachdb.exec.error | CockroachDB Exec Error | count | Number of batch KV requests that failed to execute on a node |
cockroachdb.exec.latency | CockroachDB Exec Latency | count | Latency in nanoseconds of batch KV requests executed on a node |
cockroachdb.exec.success | Cockroachdb Exec Success | count | Number of batch KV requests executed successfully on this node |
cockroachdb.gcbytesage | Cockroachdb Gcbytesage | seconds | Cumulative age of non-live data in seconds |
cockroachdb.gossip.bytes.received | Cockroachdb Gossip Bytes Received | byres | Number of gossip bytes received |
cockroachdb.gossip.bytes.sent | Cockroachdb Gossip Bytes Sent | bytes | Number of gossip bytes sent |
cockroachdb.gossip.connections.incoming | Cockroachdb Gossip Connections Incoming | count | Number of active incoming gossip connections |
cockroachdb.gossip.connections.outgoing | Cockroachdb Gossip Connections Outgoing | count | Number of active outgoing gossip connections |
cockroachdb.gossip.connections.refused | Cockroachdb Gossip Connections Refused | count | Number of refused incoming gossip connections |
cockroachdb.gossip.infos.received | Cockroachdb Gossip Infos Received | count | Number of received gossip Info objects |
cockroachdb.gossip.infos.sent | Cockroachdb Gossip Infos Sent | count | Number of sent gossip Info objects |
cockroachdb.intentage | Cockroachdb Intentage | seconds | Cumulative age of intents in seconds |
cockroachdb.intentbytes | Cockroachdb Intentbytes | bytes | Number of bytes in intent KV pairs |
cockroachdb.intentcount | Cockroachdb Intentcount | count | Count of intent keys |
cockroachdb.keybytes | Cockroachdb Keybytes | bytes | Number of bytes taken up by keys |
cockroachdb.keycount | Cockroachdb Keycount | count | Count of all keys |
cockroachdb.lastupdatenanos | Cockroachdb Lastupdatenanos | seconds | Time in nanoseconds since Unix epoch at which bytes/keys/intents metrics were last updated |
cockroachdb.livebytes | Cockroachdb Livebytes | bytes | Number of bytes of live data (keys plus values) |
cockroachdb.livecount | Cockroachdb Livecount | count | Count of live keys |
cockroachdb.liveness.epochincrements | Cockroachdb Liveness Epochincrements | count | Number of times this node has incremented its liveness epoch |
cockroachdb.liveness.heartbeatfailures | Cockroachdb Liveness Heartbeatfailures | count | Number of failed node liveness heartbeats from this node |
cockroachdb.liveness.heartbeatlatency | Cockroachdb Liveness Heartbeatlatency | seconds | Node liveness heartbeat latency in nanoseconds |
cockroachdb.liveness.heartbeatsuccesses | Cockroachdb Liveness Heartbeatsuccesses | count | Number of successful node liveness heartbeats from this node |
cockroachdb.liveness.livenodes | Cockroachdb Liveness Livenodes | count | Number of live nodes in the cluster (Zero if the node is not live) |
cockroachdb.queue.consistency.pending | Cockroachdb Queue Consistency Pending | count | Number of pending replicas in the consistency checker queue |
cockroachdb.queue.consistency.process.failure | Cockroachdb Queue Consistency Process Failure | count | Number of replicas which failed processing in the consistency checker queue |
cockroachdb.queue.consistency.process.success | Cockroachdb Queue Consistency Process Success | count | Number of replicas successfully processed by the consistency checker queue |
cockroachdb.queue.consistency.processingnanos | Cockroachdb Queue Consistency Processingnanos | seconds | Nanoseconds spent processing replicas in the consistency checker queue |
cockroachdb.queue.gc.info.abortspanconsidered | Cockroachdb Queue Gc Info Abortspanconsidered | count | Number of AbortSpan entries old enough to be considered for removal |
cockroachdb.queue.gc.info.abortspangcnum | Cockroachdb Queue Gc Info Abortspangcnum | count | Number of AbortSpan entries fit for removal |
cockroachdb.queue.gc.info.abortspanscanned | Cockroachdb Queue Gc Info Abortspanscanned | count | Number of transactions present in the AbortSpan scanned from the engine |
cockroachdb.queue.gc.info.intentsconsidered | Cockroachdb Queue Gc Info Intentsconsidered | count | Number of 'old' intents |
cockroachdb.queue.gc.info.intenttxns | Cockroachdb Queue Gc Info Intenttxns | count | Number of associated distinct transactions |
cockroachdb.queue.gc.info.numkeysaffected | Cockroachdb Queue Gc Info Numkeysaffected | count | Number of keys with GC'able data |
cockroachdb.queue.gc.info.pushtxn | Cockroachdb Queue Gc Info Pushtxn | count | Number of attempted pushes |
cockroachdb.queue.gc.info.resolvesuccessd | Cockroachdb Queue Gc Info Resolvesuccess | count | Number of successful intent resolutions |
cockroachdb.queue.gc.info.resolvetotal | Cockroachdb Queue Gc Info Resolvetotal | count | Number of attempted intent resolutions |
cockroachdb.queue.gc.info.transactionspangcaborted | Cockroachdb Queue Gc Info Transactionspangcaborted | count | Number of GC'able entries corresponding to aborted transactions |
cockroachdb.queue.gc.info.transactionspangccommitted | Cockroachdb Queue Gc Info Transactionspangccommitted | count | Number of GC'able entries corresponding to committed transactions |
cockroachdb.queue.gc.info.transactionspangcpending | Cockroachdb Queue Gc Info Transactionspangcpending | count | Number of GC'able entries corresponding to pending transactions |
cockroachdb.queue.gc.info.transactionspanscanned | Cockroachdb Queue Gc Info Transactionspanscanned | count | Number of entries in transaction spans scanned from the engine |
cockroachdb.queue.gc.pending | Cockroachdb Queue Gc Pending | count | Number of pending replicas in the GC queue |
cockroachdb.queue.gc.process.failure | Cockroachdb Queue Gc Process Failure | count | Number of replicas which failed processing in the GC queue |
cockroachdb.queue.gc.process.success | Cockroachdb Queue Gc Process Success | count | Number of replicas successfully processed by the GC queue |
cockroachdb.queue.gc.processingnanos | Cockroachdb Queue Gc Processingnanos | count | Nanoseconds spent processing replicas in the GC queue |
cockroachdb.queue.replicate.addreplica | Cockroachdb Queue Replicate Addreplica | count | Number of replica additions attempted by the replicate queue |
cockroachdb.queue.replicate.pending | Cockroachdb Queue Replicate Pending | count | Number of pending replicas in the replicate queue |
cockroachdb.queue.replicate.process.failure | Cockroachdb Queue Replicate Process Failure | count | Number of replicas which failed processing in the replicate queue |
cockroachdb.queue.replicate.process.success | Cockroachdb Queue Replicate Process Success | count | Number of replicas successfully processed by the replicate queue |
cockroachdb.queue.replicate.processingnanos | Cockroachdb Queue Replicate Processingnanos | seconds | Nanoseconds spent processing replicas in the replicate queue |
cockroachdb.queue.replicate.purgatory | Cockroachdb Queue Replicate Purgatory | count | Number of replicas in the replicate queue purgatory, awaiting allocation options |
cockroachdb.queue.replicate.rebalancereplica | Cockroachdb Queue Replicate Rebalancereplica | count | Number of replica rebalancer-initiated additions attempted by the replicate queue |
cockroachdb.queue.replicate.removedeadreplica | Cockroachdb Queue Replicate Removedeadreplica | count | Number of dead replica removals attempted by the replicate queue (typically in response to a node outage) |
cockroachdb.queue.replicate.removereplica | Cockroachdb Queue Replicate Removereplica | count | Number of replica removals attempted by the replicate queue (typically in response to a rebalancer-initiated addition) |
cockroachdb.queue.replicate.transferlease | Cockroachdb Queue Replicate Transferlease | count | Number of range lease transfers attempted by the replicate queue |
cockroachdb.queue.split.pending | Cockroachdb Queue Split Pending | count | Number of pending replicas in the split queue |
cockroachdb.queue.split.process.failure | Cockroachdb Queue Split Process Failure | count | Number of replicas which failed processing in the split queue |
cockroachdb.queue.split.process.success | Cockroachdb Queue Split Process Success | count | Number of replicas successfully processed by the split queue |
cockroachdb.queue.split.processingnanos | Cockroachdb Queue Split Processingnanos | seconds | Nanoseconds spent processing replicas in the split queue |
cockroachdb.queue.tsmaintenance.pending | Cockroachdb Queue Tsmaintenance Pending | count | Number of pending replicas in the time series maintenance queue |
cockroachdb.queue.tsmaintenance.process.failure | Cockroachdb Queue Tsmaintenance Process Failure | count | Number of replicas which failed processing in the time series maintenance queue |
cockroachdb.queue.tsmaintenance.process.success | Cockroachdb Queue Tsmaintenance Process Success | count | Number of replicas successfully processed by the time series maintenance queue |
cockroachdb.queue.tsmaintenance.processingnanos | Cockroachdb Queue Tsmaintenance Processingnanos | seconds | Nanoseconds spent processing replicas in the time series maintenance queue |
cockroachdb.rebalancing.writespersecond | Cockroachdb Rebalancing Writespersecond | count | Number of keys written, applied by raft, per second to the store, averaged over a large time period as used in rebalancing decisions |
cockroachdb.replicas.leaders | Cockroachdb Replicas Leaders | count | Number of raft leaders |
cockroachdb.replicas.leaders.not_leaseholders | Cockroachdb Replicas Leaders Not Leaseholders | count | Number of replicas that are Raft leaders whose range lease is held by another store |
cockroachdb.replicas.leaseholders | Cockroachdb Replicas Leaseholders | count | Number of lease holders |
cockroachdb.replicas.quiescent | Cockroachdb Replicas Quiescent | count | Number of quiesced replicas |
cockroachdb.replicas.reserved | Cockroachdb Replicas Reserved | count | Number of replicas reserved for snapshots |
cockroachdb.replicas.total | Cockroachdb Replicas Total | count | Number of replicas |
cockroachdb.rocksdb.block.cache.hits | Cockroachdb Rocksdb Block Cache Hits | count | Count of block cache hits |
cockroachdb.rocksdb.block.cache.misses | Cockroachdb Rocksdb Block Cache Misses | count | Count of block cache misses |
cockroachdb.rocksdb.block.cache.pinned.usage | Cockroachdb Rocksdb Block Cache Pinned Usage | bytes | Bytes pinned by the block cache |
cockroachdb.rocksdb.block.cache.usage | Cockroachdb Rocksdb Block Cache Usage | bytes | Bytes used by the block cache |
cockroachdb.rocksdb.bloom_filter.prefix.checked | Cockroachdb Rocksdb Bloom Filter Prefix Checked | count | Number of times the bloom filter was checked |
cockroachdb.rocksdb.bloom_filter.prefix.useful | Cockroachdb Rocksdb Bloom Filter Prefix Useful | count | Number of times the bloom filter helped avoid iterator creation |