Skip to main content
The cockroach debug tsdump connects to your cluster and collects timeseries diagnostic data from each active node (inactive nodes are not included). This includes both current and historical runtime metrics for your cluster, including those exposed in the pages as well as internal metrics. cockroach debug tsdump is mostly used in tandem with the command to gather diagnostic data during escalations to Cockroach Labs support. Follow the steps in this procedure to gather and prepare the timeseries diagnostic data and prepare it for transit to Cockroach Labs.

Subcommands

While the cockroach debug command has a few subcommands, users are expected to use only the , , , , , and subcommands. We recommend using the and subcommands only when directed by the . The other debug subcommands are useful only to Cockroach Labs. Output of debug commands may contain sensitive or secret information.

Synopsis

The following flags must apply to an active CockroachDB node. If no nodes are live, you must .

Flags

The debug tsdump subcommand supports the following general-use, client connection, and logging flags.

General

Available resolutions

A debug tsdump includes all the available resolutions (10s and 30m) of the raw time series values in the time range set using the --from and --to flags:
  • Time series values will be dumped with a 10 seconds resolution if the supplied time range is within the 10s TTL set by the cluster setting (default: 10 days).
  • Time series values will be dumped with a 30 minutes resolution if the supplied time range is older than the 10s TTL back to the 30m TTL set by the cluster setting (default: 90 days).
For example, if today was 2024-11-15 and --to was set to the current timestamp (2024-11-15), and --from was set to 15 days before the current timestamp (2024-11-01), the debug tsdump would include:
  • Time series values with a 10 seconds resolution for 2024-11-05 to 2024-11-15 (within the 10s TTL of 10 days).
  • Time series values with a 30 minutes resolution for 2024-11-01 to 2024-11-04 (outside the 10s TTL of 10 days, but within the 30s TTL of 90 days).

Client connection

Logging

By default, this command logs messages to stdout. If you need to troubleshoot this command’s behavior, you can .

Examples

Generate a tsdump gob file

Generate the tsdump gob file for an insecure CockroachDB cluster:
Generate the tsdump gob file for a secure CockroachDB cluster:
Secure examples assume you have the appropriate certificates in the default certificate directory, ${HOME}/.cockroach-certs/. See the documentation for more information.

Generate a tsdump gob file and compress using gzip

Generate a tsdump gob file for an insecure CockroachDB cluster, and compress using gzip in preparation to send to Cockroach Labs for troubleshooting. Your server must have gzip installed:
Generate a tsdump gob file for a secure CockroachDB cluster, and compress using gzip in preparation to send to Cockroach Labs for troubleshooting. Your server must have gzip installed:
Secure examples assume you have the appropriate certificates in the default certificate directory, ${HOME}/.cockroach-certs/. See the documentation for more information.

Generate a tsdump gob file with a custom timestamp range

Generate a tsdump gob file specifying a custom timestamp range to limit the data collection to a specific interval. This is useful for reducing the size of the resulting gob file if the data needed to troubleshoot falls within a known timestamp range:

Generate a tsdump with only essential and support metrics

Use the --non-verbose flag to dump only metrics tagged as ESSENTIAL and SUPPORT. This option is ideal for:
  • Standard support escalations
  • Routine health checks
  • Cases where you want to minimize file size and collection time
For a secure cluster:

Generate a tsdump with specific metrics

Use the --metrics-list-file flag to include only specific metrics in a tsdump by providing a file with metric names or regular expression patterns. This option is ideal for:
  • Scenario-specific investigations (for example, contention, latency, or replication issues)
  • Following runbooks for specific classes of issues
  • Investigating a targeted subset of metrics
First, create a text file with the metrics you want to include. You can specify exact metric names or use regex patterns. Only metrics whose names match the patterns in the file are included in the output. Blank lines and comment lines (starting with #) are ignored:
Then generate the tsdump with only the specified metrics:
For a secure cluster:

See also