Skip to main content
The cockroach debug tsdump command 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 DB Console Metrics pages as well as internal metrics. cockroach debug tsdump is mostly used in tandem with the cockroach debug zip 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 zip, encryption-active-key, merge-logs, list-files, tsdump, and ballast subcommands. We recommend using the encryption-decrypt and job-trace subcommands only when directed by the Cockroach Labs support team. 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 start at least one node.

Flags

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

General

Client connection

Logging

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

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 cockroach cert 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 cockroach cert 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:

See also