The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

CockroachDB

Plugin: go.d.plugin Module: cockroachdb

Overview

This collector monitors CockroachDB servers.

It scrapes Prometheus metrics from the CockroachDB /_status/vars endpoint.

It also provides top-queries and running-queries functions using SQL statement statistics (crdb_internal.cluster_statement_statistics) and the SHOW CLUSTER STATEMENTS command.

This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration, including remote instances.

The top-queries and running-queries functions require:

  • A SQL user with VIEWACTIVITY or VIEWACTIVITYREDACTED privileges.
  • Access to crdb_internal.cluster_statement_statistics (may require SET allow_unsafe_internals = on on newer versions).

Default Behavior

Auto-Detection

This integration doesn’t support auto-detection.

Limits

The default configuration for this integration does not impose any limits on data collection.

Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

Setup

You can configure the cockroachdb collector in two ways:

MethodBest forHow to
UIFast setup without editing filesGo to Nodes → Configure this node → Collectors → Jobs, search for cockroachdb, then click + to add a job.
FileIf you prefer configuring via file, or need to automate deployments (e.g., with Ansible)Edit go.d/cockroachdb.conf and add a job.

Important

UI configuration requires paid Netdata Cloud plan.

Prerequisites

No action required.

Configuration

Options

The following options can be defined globally: update_every, autodetection_retry.

GroupOptionDescriptionDefaultRequired
Collectionupdate_everyData collection interval (seconds).10no
autodetection_retryAutodetection retry interval (seconds). Set 0 to disable.0no
TargeturlTarget endpoint URL.http://127.0.0.1:8080/_status/varsyes
timeoutHTTP request timeout (seconds).1no
HTTP AuthusernameUsername for Basic HTTP authentication.no
passwordPassword for Basic HTTP authentication.no
bearer_token_filePath to a file containing a bearer token (used for Authorization: Bearer).no
TLStls_skip_verifySkip TLS certificate and hostname verification (insecure).nono
tls_caPath to CA bundle used to validate the server certificate.no
tls_certPath to client TLS certificate (for mTLS).no
tls_keyPath to client TLS private key (for mTLS).no
Proxyproxy_urlHTTP proxy URL.no
proxy_usernameUsername for proxy Basic HTTP authentication.no
proxy_passwordPassword for proxy Basic HTTP authentication.no
RequestmethodHTTP method to use.GETno
bodyRequest body (e.g., for POST/PUT).no
headersAdditional HTTP headers (one per line as key: value).no
not_follow_redirectsDo not follow HTTP redirects.nono
force_http2Force HTTP/2 (including h2c over TCP).nono
Functionsfunctions.dsnSQL DSN (required for query functions).no
functions.top_queries.disabledDisable the top-queries function.nono
functions.top_queries.timeoutQuery timeout (seconds). Uses collector timeout if not set.no
functions.top_queries.limitMaximum number of queries to return.500no
functions.running_queries.disabledDisable the running-queries function.nono
functions.running_queries.timeoutQuery timeout (seconds). Uses collector timeout if not set.no
functions.running_queries.limitMaximum number of queries to return.500no
Virtual NodevnodeAssociates this data collection job with a Virtual Node.no

via UI

Configure the cockroachdb collector from the Netdata web interface:

  1. Go to Nodes.
  2. Select the node where you want the cockroachdb data-collection job to run and click the :gear: (Configure this node). That node will run the data collection.
  3. The Collectors → Jobs view opens by default.
  4. In the Search box, type cockroachdb (or scroll the list) to locate the cockroachdb collector.
  5. Click the + next to the cockroachdb collector to add a new job.
  6. Fill in the job fields, then click Test to verify the configuration and Submit to save.
    • Test runs the job with the provided settings and shows whether data can be collected.
    • If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.

via File

The configuration file name for this integration is go.d/cockroachdb.conf.

The file format is YAML. Generally, the structure is:

update_every: 1
autodetection_retry: 0
jobs:
  - name: some_name1
  - name: some_name2

You can edit the configuration file using the edit-config script from the Netdata config directory.

cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config go.d/cockroachdb.conf
Examples
Basic

An example configuration.

jobs:
  - name: local
    url: http://127.0.0.1:8080/_status/vars
Top queries

Enable SQL query functions.

jobs:
  - name: local
    url: http://127.0.0.1:8080/_status/vars
    functions:
      dsn: postgres://root@127.0.0.1:26257/defaultdb?sslmode=disable
HTTP authentication

Local server with basic HTTP authentication.

jobs:
  - name: local
    url: http://127.0.0.1:8080/_status/vars
    username: username
    password: password
HTTPS with self-signed certificate

CockroachDB with enabled HTTPS and self-signed certificate.

jobs:
  - name: local
    url: https://127.0.0.1:8080/_status/vars
    tls_skip_verify: yes
Multi-instance

Note

When you define multiple jobs, their names must be unique.

Collecting metrics from local and remote instances.

jobs:
  - name: local
    url: http://127.0.0.1:8080/_status/vars

  - name: remote
    url: http://203.0.113.10:8080/_status/vars

Metrics

Metrics grouped by scope.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.

Per CockroachDB instance

These metrics refer to the entire monitored application.

This scope has no labels.

Metrics:

MetricDescriptionDimensionsUnit
cockroachdb.process_cpu_time_combined_percentageCombined CPU Time Percentage, Normalized 0-1 by Number of Coresusedpercentage
cockroachdb.process_cpu_time_percentageCPU Time Percentageuser, syspercentage
cockroachdb.process_cpu_timeCPU Timeuser, sysms
cockroachdb.process_memoryMemory UsagerssKiB
cockroachdb.process_file_descriptorsFile Descriptorsopenfd
cockroachdb.process_uptimeUptimeuptimeseconds
cockroachdb.host_disk_bandwidthHost Disk Cumulative Bandwidthread, writeKiB
cockroachdb.host_disk_operationsHost Disk Cumulative Operationsreads, writesoperations
cockroachdb.host_disk_iops_in_progressHost Disk Cumulative IOPS In Progressin_progressiops
cockroachdb.host_network_bandwidthHost Network Cumulative Bandwidthreceived, sentkilobits
cockroachdb.host_network_packetsHost Network Cumulative Packetsreceived, sentpackets
cockroachdb.live_nodesLive Nodes in the Clusterlive_nodesnodes
cockroachdb.node_liveness_heartbeatsNode Liveness Heartbeatssuccessful, failedheartbeats
cockroachdb.total_storage_capacityTotal Storage CapacitytotalKiB
cockroachdb.storage_capacity_usabilityStorage Capacity Usabilityusable, unusableKiB
cockroachdb.storage_usable_capacityStorage Usable Capacityavailable, usedKiB
cockroachdb.storage_used_capacity_percentageStorage Used Capacity Utilizationtotal, usablepercentage
cockroachdb.sql_connectionsActive SQL Connectionsactiveconnections
cockroachdb.sql_bandwidthSQL Bandwidthreceived, sentKiB
cockroachdb.sql_statements_totalSQL Statements Totalstarted, executedstatements
cockroachdb.sql_errorsSQL Statements and Transaction Errorsstatement, transactionerrors
cockroachdb.sql_started_ddl_statementsSQL Started DDL Statementsddlstatements
cockroachdb.sql_executed_ddl_statementsSQL Executed DDL Statementsddlstatements
cockroachdb.sql_started_dml_statementsSQL Started DML Statementsselect, update, delete, insertstatements
cockroachdb.sql_executed_dml_statementsSQL Executed DML Statementsselect, update, delete, insertstatements
cockroachdb.sql_started_tcl_statementsSQL Started TCL Statementsbegin, commit, rollback, savepoint, savepoint_cockroach_restart, release_savepoint_cockroach_restart, rollback_to_savepoint_cockroach_restartstatements
cockroachdb.sql_executed_tcl_statementsSQL Executed TCL Statementsbegin, commit, rollback, savepoint, savepoint_cockroach_restart, release_savepoint_cockroach_restart, rollback_to_savepoint_cockroach_restartstatements
cockroachdb.sql_active_distributed_queriesActive Distributed SQL Queriesactivequeries
cockroachdb.sql_distributed_flowsDistributed SQL Flowsactive, queuedflows
cockroachdb.live_bytesUsed Live Dataapplications, systemKiB
cockroachdb.logical_dataLogical Datakeys, valuesKiB
cockroachdb.logical_data_countLogical Data Countkeys, valuesnum
cockroachdb.kv_transactionsKV Transactionscommitted, fast-path_committed, abortedtransactions
cockroachdb.kv_transaction_restartsKV Transaction Restartswrite_too_old, write_too_old_multiple, forwarded_timestamp, possible_reply, async_consensus_failure, read_within_uncertainty_interval, aborted, push_failure, unknownrestarts
cockroachdb.rangesRangesrangesranges
cockroachdb.ranges_replication_problemRanges Replication Problemsunavailable, under_replicated, over_replicatedranges
cockroachdb.range_eventsRange Eventssplit, add, remove, mergeevents
cockroachdb.range_snapshot_eventsRange Snapshot Eventsgenerated, applied_raft_initiated, applied_learner, applied_preemptiveevents
cockroachdb.rocksdb_read_amplificationRocksDB Read Amplificationreadsreads/query
cockroachdb.rocksdb_table_operationsRocksDB Table Operationscompactions, flushesoperations
cockroachdb.rocksdb_cache_usageRocksDB Block Cache UsageusedKiB
cockroachdb.rocksdb_cache_operationsRocksDB Block Cache Operationshits, missesoperations
cockroachdb.rocksdb_cache_hit_rateRocksDB Block Cache Hit Ratehit_ratepercentage
cockroachdb.rocksdb_sstablesRocksDB SSTablessstablessstables
cockroachdb.replicasNumber of Replicasreplicasreplicas
cockroachdb.replicas_quiescenceReplicas Quiescencequiescent, activereplicas
cockroachdb.replicas_leadersNumber of Raft Leadersleaders, not_leaseholdersreplicas
cockroachdb.replicas_leaseholdersNumber of Leaseholdersleaseholdersleaseholders
cockroachdb.queue_processing_failuresQueues Processing Failuresgc, replica_gc, replication, split, consistency, raft_log, raft_snapshot, time_series_maintenancefailures
cockroachdb.rebalancing_queriesRebalancing Average Queriesavgqueries/s
cockroachdb.rebalancing_writesRebalancing Average Writesavgwrites/s
cockroachdb.timeseries_samplesTime Series Written Sampleswrittensamples
cockroachdb.timeseries_write_errorsTime Series Write Errorswriteerrors
cockroachdb.timeseries_write_bytesTime Series Bytes WrittenwrittenKiB
cockroachdb.slow_requestsSlow Requestsacquiring_latches, acquiring_lease, in_raftrequests
cockroachdb.code_heap_memory_usageHeap Memory Usagego, cgoKiB
cockroachdb.goroutinesNumber of Goroutinesgoroutinesgoroutines
cockroachdb.gc_countGC Runsgcinvokes
cockroachdb.gc_pauseGC Pause Timepauseus
cockroachdb.cgo_callsCgo Callscgocalls

Alerts

The following alerts are available:

Alert nameOn metricDescription
cockroachdb_used_storage_capacitycockroachdb.storage_used_capacity_percentagestorage capacity utilization
cockroachdb_used_usable_storage_capacitycockroachdb.storage_used_capacity_percentagestorage usable space utilization
cockroachdb_unavailable_rangescockroachdb.ranges_replication_problemnumber of ranges with fewer live replicas than needed for quorum
cockroachdb_underreplicated_rangescockroachdb.ranges_replication_problemnumber of ranges with fewer live replicas than the replication target
cockroachdb_open_file_descriptors_limitcockroachdb.process_file_descriptorsopen file descriptors utilization (against softlimit)

Live Data

This collector exposes real-time functions for interactive troubleshooting in the Live tab.

Top Queries

Retrieves and aggregates SQL statement performance metrics from CockroachDB crdb_internal.cluster_statement_statistics table.

This function queries cluster-wide statement statistics grouped by fingerprint (normalized query pattern). It provides aggregated metrics including execution counts, timing breakdowns, and row operation statistics.

Use cases:

  • Identify slow queries consuming the most total execution time
  • Find frequently executed queries that may benefit from optimization
  • Analyze row read/write patterns to detect inefficient queries

Query text is truncated at 4096 characters for display purposes.

AspectDescription
NameCockroachdb:top-queries
Require Cloudyes
PerformanceQueries the crdb_internal.cluster_statement_statistics table which aggregates data across the cluster:
• On busy clusters with high query throughput, this query may take longer
• Default limit of 500 rows balances usefulness with performance
SecurityQuery text may contain unmasked literal values including potentially sensitive data:
• Personal information in WHERE clauses or INSERT values
• Business data and internal identifiers
• Access should be restricted to authorized personnel only
AvailabilityAvailable when:
• The collector has successfully connected to CockroachDB
• The SQL user has VIEWACTIVITY or VIEWACTIVITYREDACTED privileges
• Returns HTTP 503 if the SQL connection cannot be established
• Returns HTTP 500 if the query fails
• Returns HTTP 504 if the query times out

Prerequisites

Grant VIEWACTIVITY access to cluster statement stats

The SQL user must have appropriate privileges to access statement statistics.

  1. Grant VIEWACTIVITY (shows full query text) or VIEWACTIVITYREDACTED (masks literals):

    GRANT SYSTEM VIEWACTIVITY TO netdata_user;
    -- OR for privacy:
    GRANT SYSTEM VIEWACTIVITYREDACTED TO netdata_user;
    
  2. On newer CockroachDB versions, access to crdb_internal may require:

    SET allow_unsafe_internals = on;
    

Info

  • The collector automatically sets allow_unsafe_internals = on for the session when querying crdb_internal tables (required on newer versions)
  • VIEWACTIVITYREDACTED replaces literal values with underscores for privacy
  • Statement statistics are collected by default but can be disabled via cluster settings

Parameters

ParameterTypeDescriptionRequiredDefaultOptions
Filter ByselectSelect the primary sort column. Options include total time, executions, rows read, rows written, and more. Defaults to total time to focus on most resource-intensive queries.yestotalTime

Returns

Aggregated SQL statement statistics grouped by fingerprint. Each row represents a unique query pattern with cumulative metrics across all executions.

ColumnTypeUnitVisibilityDescription
Fingerprint IDstringhiddenUnique hash identifier for the normalized query pattern. Queries with identical structure but different literal values share the same fingerprint.
QuerystringNormalized SQL statement text with literals replaced. Truncated to 4096 characters.
DatabasestringDatabase name where the query was executed. Empty for queries without database context.
ApplicationstringApplication name that executed the query. Useful for identifying query sources across services.
Statement TypestringhiddenType of SQL statement (SELECT, INSERT, UPDATE, DELETE, etc.).
DistributedstringhiddenWhether the query used DistSQL execution (true/false). Distributed queries span multiple nodes.
Full ScanstringhiddenWhether the query performed a full table scan (true/false). Full scans may indicate missing indexes.
Implicit TxnstringhiddenWhether the statement ran in an implicit transaction (true/false).
VectorizedstringhiddenWhether the query used vectorized execution (true/false). Vectorized execution improves performance for analytical queries.
ExecutionsintegerTotal number of times this query pattern has been executed. High values indicate frequently run queries.
Total TimedurationmillisecondsCumulative service latency across all executions (mean time × executions). High values indicate queries consuming significant cluster resources.
Mean TimedurationmillisecondsAverage service latency per execution. Use this to compare typical performance across query patterns.
Run TimedurationmillisecondshiddenAverage time spent executing the query after planning. Excludes parse and plan time.
Plan TimedurationmillisecondshiddenAverage time spent generating the query execution plan. High values may indicate complex queries or stale statistics.
Parse TimedurationmillisecondshiddenAverage time spent parsing the SQL statement.
Rows ReadintegerTotal rows read across all executions. High values relative to rows returned suggest missing indexes or inefficient scans.
Rows WrittenintegerTotal rows written across all executions. Indicates write workload for INSERT, UPDATE, DELETE statements.
Rows ReturnedintegerTotal rows returned to clients across all executions. Compare with rows read to assess query efficiency.
Bytes ReadintegerhiddenTotal bytes read from storage across all executions. Indicates I/O load for the query pattern.
Max RetriesintegerhiddenMaximum number of automatic retries observed for this query pattern. High values indicate transaction contention.

Running Queries

Retrieves currently executing SQL statements across the CockroachDB cluster using SHOW CLUSTER STATEMENTS.

This function provides a real-time snapshot of all active queries across all nodes in the cluster, including their execution phase, duration, and associated metadata.

Use cases:

  • Identify long-running queries that may be blocking other operations
  • Monitor active workload distribution across the cluster
  • Debug stuck or slow queries in real-time

Query text is truncated at 4096 characters for display purposes.

AspectDescription
NameCockroachdb:running-queries
Require Cloudyes
PerformanceExecutes the SHOW CLUSTER STATEMENTS command which queries all nodes in the cluster:
• Lightweight operation with minimal overhead
• Returns only currently active queries, typically a small result set
SecurityQuery text may contain unmasked literal values including potentially sensitive data:
• Personal information in WHERE clauses or VALUES
• Session tokens or credentials
• Access should be restricted to authorized personnel only
AvailabilityAvailable when:
• The collector has successfully connected to CockroachDB
• The SQL user has VIEWACTIVITY or VIEWACTIVITYREDACTED privileges
• Returns HTTP 503 if the SQL connection cannot be established
• Returns HTTP 500 if the query fails
• Returns HTTP 504 if the query times out

Prerequisites

Grant VIEWACTIVITY access to system tables

The SQL user must have appropriate privileges to view running statements.

  1. Grant VIEWACTIVITY (shows full query text) or VIEWACTIVITYREDACTED (masks literals):

    GRANT SYSTEM VIEWACTIVITY TO netdata_user;
    -- OR for privacy:
    GRANT SYSTEM VIEWACTIVITYREDACTED TO netdata_user;
    

Info

  • SHOW CLUSTER STATEMENTS shows queries across all nodes, not just the connected node
  • VIEWACTIVITYREDACTED replaces literal values with underscores for privacy
  • Queries shown are point-in-time snapshots and may complete between retrieval and display

Parameters

ParameterTypeDescriptionRequiredDefaultOptions
Filter ByselectSelect the primary sort column. Defaults to elapsed time to show longest-running queries first.yeselapsedMs

Returns

Real-time snapshot of currently executing SQL statements across all cluster nodes. Each row represents a single active query.

ColumnTypeUnitVisibilityDescription
Query IDstringhiddenUnique identifier for this specific query execution. Can be used with CANCEL QUERY if needed.
QuerystringThe SQL statement currently being executed. Truncated to 4096 characters.
UserstringDatabase user executing the query. Useful for identifying workload by user.
ApplicationstringApplication name from the client connection. Helps identify which service is running the query.
Client AddressstringhiddenIP address of the client connection. Useful for identifying query sources.
Node IDstringhiddenCockroachDB node currently executing the query. Helps identify workload distribution.
Session IDstringhiddenSession identifier for the connection. Multiple queries may share a session.
PhasestringCurrent execution phase (executing, preparing, etc.). Indicates query progress.
DistributedstringhiddenWhether the query is using distributed execution across multiple nodes.
Start TimestringhiddenTimestamp when the query started executing.
ElapseddurationmillisecondsTime elapsed since query started. High values indicate long-running queries that may need investigation.

Troubleshooting

Debug Mode

Important: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.

To troubleshoot issues with the cockroachdb collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn’t working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that’s not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
    
  • Switch to the netdata user.

    sudo -u netdata -s
    
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m cockroachdb
    

    To debug a specific job:

    ./go.d.plugin -d -m cockroachdb -j jobName
    

Getting Logs

If you’re encountering problems with the cockroachdb collector, follow these steps to retrieve logs and identify potential issues:

  • Run the command specific to your system (systemd, non-systemd, or Docker container).
  • Examine the output for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.

System with systemd

Use the following command to view logs generated since the last Netdata service restart:

journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep cockroachdb

System without systemd

Locate the collector log file, typically at /var/log/netdata/collector.log, and use grep to filter for collector’s name:

grep cockroachdb /var/log/netdata/collector.log

Note: This method shows logs from all restarts. Focus on the latest entries for troubleshooting current issues.

Docker Container

If your Netdata runs in a Docker container named “netdata” (replace if different), use this command:

docker logs netdata 2>&1 | grep cockroachdb

The observability platform companies need to succeed

Sign up for free

Want a personalised demo of Netdata for your use case?

Contact Sales