Introduction
CockroachDB is a distributed SQL database built for high availability and scalability. By integrating SQL with a distributed architecture, it ensures resilience and strong data consistency. It is available in two editions: Community and Enterprise.
Typically, Prometheus metrics are exposed at https://<host>:8080/_status/vars
.
While it can be used for development purposes, most users operate CockroachDB exclusively in HTTPS mode.
Kubernetes 2.0 ConfigMap
Users should update or append the existing ConfigMap named opsramp-workload-metric-user-config
by adding application-specific fields. These fields may include authentication credentials, collection frequency, and other relevant configurations.
apiVersion: v1
kind: ConfigMap
metadata:
name: opsramp-workload-metric-user-config
namespace: opsramp-agent
data:
workloads: |
cockroach:
- name: cockroach
collectionFrequency: 2m
port: 8080
scheme: "https"
userRelabelConfigs:
- regex: 'kvadmission_flow_controller_elastic_tokens_returned'
action: include
- regex: 'sql_misc_count'
action: include
targetPodSelector:
matchLabels:
- key: controller-revision-hash
operator: ==
value:
- my-release-cockroachdb-74879bc9cc
Supported Metrics
Supported metrics for this workload as provided by the Kubernetes 2.0 Agent.
Metric | Description |
---|---|
rocksdb_block_cache_usage | Tracks memory used by the RocksDB block cache |
jobs_changefeed_resume_failed | Counts failed attempts to resume changefeeds |
queue_gc_info_transactionresolvefailed | Number of failed transaction resolution attempts by GC |
keycount | Total number of keys in the database |
gossip_callbacks_pending | Number of pending gossip callbacks |
changefeed_total_ranges | Total number of ranges being watched by changefeeds |
kv_rangefeed_registrations | Number of active rangefeed registrations |
rpc_streams_mux_rangefeed_active | Active multiplexed rangefeed RPC streams |
admission_wait_durations_sql_sql_response_sum | Total wait duration for SQL response admission |
cloud_write_bytes | Total bytes written to cloud storage |
sys_host_net_send_bytes | Total network bytes sent by the host system |
sql_update_count_internal | Number of internal SQL update statements executed |
queue_replicate_replacedecommissioningreplica_success | Successful replacements of decommissioned replicas |
jobs_new_schema_change_currently_running | Number of running schema change jobs |
kv_rangefeed_mem_shared | Memory usage of shared rangefeed resources |
range_snapshots_send_total_in_progress | Current number of range snapshots being sent |
sql_ddl_count_internal | Number of internal DDL statements executed |
distsender_rpc_err_errordetailtype_20_ | Number of DistSender RPC errors of type 20 |
kv_protectedts_reconciliation_errors | Number of errors in protected timestamp reconciliation |
requests_slow_raft | Counts of slow Raft requests |
queue_replicate_removereplica_error | Errors encountered while removing replicas |
tenant_consumption_read_requests | Number of read requests made by tenants |
log_fluent_sink_write_attempts | Attempts to write to the fluent log sink |