CockroachDB Integration
Monitor distributed SQL metrics, range rebalancing, transaction conflicts, and node health across your CockroachDB cluster. AI-powered hot spot detection and anomaly alerting.
How It Works
Enable the Prometheus Endpoint
CockroachDB exposes a Prometheus-compatible metrics endpoint on port 8080 by default. TigerOps scrapes this endpoint from all nodes to collect cluster-wide metrics.
Configure Multi-Node Scraping
Add all CockroachDB node addresses to the TigerOps scrape config. Metrics from all nodes are aggregated into cluster-level views with per-node drill-down capability.
Set Rebalancing & Latency Alerts
Define alerts for replica rebalancing events, range under-replication, KV latency percentiles, and transaction conflict rates. TigerOps fires before data availability is impacted.
Correlate with Application Traffic
TigerOps links CockroachDB SQL latency metrics with application-level traces to attribute slowness to the database layer, network, or application logic with precision.
What You Get Out of the Box
SQL Layer Metrics
Per-statement type (SELECT, INSERT, UPDATE, DELETE) execution counts, latency histograms, error rates, and contention statistics. Identify hot tables from SQL metrics alone.
Range & Replica Health
Track range count, under-replicated ranges, unavailable ranges, and replica rebalancing rates. TigerOps alerts immediately when replicas fall below the replication factor.
Transaction Conflict Monitoring
Monitor transaction restarts, write conflicts, serialization failures, and lock contention rates. High conflict rates are surfaced with the implicated SQL operations.
Node Resource Metrics
Per-node CPU, memory, disk I/O, and network metrics alongside CockroachDB-specific metrics like Raft proposal rate and store byte capacity utilization.
Liveness & Gossip Health
Track node liveness status, gossip network connectivity, and heartbeat latency. Node liveness issues are immediately surfaced as critical alerts with recovery guidance.
AI Anomaly Detection
TigerOps AI learns normal KV operation rates, latency baselines, and rebalancing patterns. Unusual rebalancing storms, latency regressions, and hot spot patterns trigger instant alerts.
cockroach start Flags + Prometheus Endpoint
Start CockroachDB with the HTTP port exposed and configure TigerOps scraping.
# Start CockroachDB with HTTP port for Prometheus scraping
cockroach start \
--certs-dir=/certs \
--store=path=/var/lib/cockroach \
--listen-addr=localhost:26257 \
--http-addr=0.0.0.0:8080 \ # Prometheus metrics on :8080/_status/vars
--join=node1:26257,node2:26257,node3:26257 \
--locality=region=us-east-1,zone=us-east-1a \
--background
# Verify the Prometheus endpoint is working
curl http://localhost:8080/_status/vars | head -20
# TigerOps scrape config (all cluster nodes):
# scrape_configs:
# - job_name: cockroachdb
# metrics_path: /_status/vars
# scheme: https
# tls_config:
# ca_file: /certs/ca.crt
# cert_file: /certs/client.monitoring.crt
# key_file: /certs/client.monitoring.key
# static_configs:
# - targets:
# - cockroach-node-1.internal:8080
# - cockroach-node-2.internal:8080
# - cockroach-node-3.internal:8080
# labels:
# cluster: prod-us-east-1
#
# remote_write:
# - url: https://ingest.atatus.net/api/v1/write
# bearer_token: "${TIGEROPS_API_KEY}"
# write_relabel_configs:
# - source_labels: [__name__]
# regex: 'sql_.*|kv_.*|raft_.*|capacity.*|ranges.*|liveness.*'
# action: keepCommon Questions
Which CockroachDB versions does TigerOps support?
TigerOps supports CockroachDB v21.1 and later via the built-in Prometheus metrics endpoint. Both CockroachDB Core (open source) and CockroachDB Dedicated (cloud) are supported. CockroachDB Serverless is supported via the CockroachDB Cloud API.
How does TigerOps handle CockroachDB multi-region clusters?
Deploy a TigerOps scraper in each region to collect node-local metrics with low latency. All metrics are tagged with region and locality labels. TigerOps provides cross-region aggregate dashboards and per-region drill-down views.
Can TigerOps alert on CockroachDB hot spots?
Yes. CockroachDB emits hot_ranges_count and related metrics. TigerOps fires an alert when a specific range accumulates disproportionate read/write load, and recommends hash-sharding or index changes based on the hot spot pattern.
Does TigerOps support CockroachDB changefeeds?
Yes. CockroachDB changefeed metrics — rows emitted, emit latency, and resolved timestamp lag — are scraped alongside standard metrics. TigerOps alerts when changefeed lag exceeds your SLO for downstream consumers.
How do I monitor CockroachDB disk storage capacity?
TigerOps tracks the capacity_available metric per node and fires a warning at 80% and critical at 90% utilization. For cloud deployments, disk auto-provisioning events are also tracked when available through the cloud provider API.
Full Visibility into Your Distributed SQL Cluster
Range rebalancing alerts, transaction conflict monitoring, and AI hot spot detection for CockroachDB.