Skip to main content
Version: 23.1

rpk debug bundle

The rpk debug bundle command collects environment data that can help debug and diagnose issues with a Redpanda cluster, a broker, or the machine it`s running on. It then bundles the collected data into a ZIP file, called a diagnostics bundle.

important

In Kubernetes, you must execute the rpk debug bundle command inside a container that's running a Redpanda broker.

Usage

rpk debug bundle [flags]

Flags

ValueTypeDescription
--admin-api-tls-certstringThe certificate to be used for TLS authentication with the Admin API.
--admin-api-tls-enabled-Enable TLS for the Admin API (not necessary if specifying custom certs).
--admin-api-tls-keystringThe certificate key to be used for TLS authentication with the Admin API.
--admin-api-tls-truststorestringThe truststore to be used for TLS communication with the Admin API.
--api-urlsstringThe address to the broker`s Admin API. Defaults to the one in the config file.
--brokersstringsComma-separated list of broker <ip>:<port> pairs, for example--brokers 192.168.78.34:9092,192.168.78.35:9092,192.179.23.54:9092. Alternatively, you may set the REDPANDA_BROKERSenvironment variable with the comma-separated list of broker addresses.
--configstringRedpanda configuration file. If not set, rpk searches for the file in the default locations.
--controller-logs-size-limitstringSets the limit of the controller log size that can be stored in the bundle. Multipliers are also supported, e.g. 3MB, 1GiB (default "20MB").
-h, --help- Display documentation for rpk debug bundle.
--logs-sincestringInclude log entries on or newer than the specified date in journalctl date format, for example YYYY-MM-DD.
--logs-size-limitstringRead the logs until the given size is reached. Multipliers are also supported, e.g. 3MB, 1GiB (default "100MiB").
--logs-untilstringInclude log entries on or older than the specified date in journalctl date format, for example YYYY-MM-DD.
Not supported in Kubernetes
--metrics-intervaldurationThe amount of time to wait before capturing the second snapshot of the metrics endpoints, for example30s (30 seconds) or 1.5m (90 seconds). This interval is useful because some metrics are counters that need values at two points in time. Default: 12s.
Kubernetes only
--namespacestringThe Kubernetes namespace in which the Redpanda cluster is running. Default: redpanda
Kubernetes only.
--passwordstring SASL password to be used for authentication.
--sasl-mechanismstringThe authentication mechanism to use. Supported values: SCRAM-SHA-256 andSCRAM-SHA-512.
--timeoutdurationThe amount of time to wait for child commands to execute, for example30s (30 seconds) or 1.5m (90 seconds). Default: 10s.
--tls-certstringThe certificate to be used for TLS authentication with the broker.
--tls-enabled-Enable TLS for the Kafka API (not necessary if specifying custom certs).
--tls-keystringThe certificate key to be used for TLS authentication with the broker.
--tls-truststorestringThe truststore to be used for TLS communication with the broker.
--upload-urlstring The URL to which to upload the diagnostics bundle. This URL is usually given to you by the Redpanda support team to help you debug your deployment.
Kubernetes only
--userstringSASL user to be used for authentication.
-v, --verbose-Enable verbose logging. Default: false.

Result

The files and directories in the diagnostics bundle differ depending on the environment in which Redpanda is running.

note

For some data, Redpanda requires the rpk debug bundle command to be run with root privileges. The names of the files or directories that are generated only with root privileges are labeled Requires root privileges.

File or DirectoryDescription
data-dir.txtMetadata for the Redpanda data directory of the broker on which the rpk debug bundle command was executed.
dig.txtThe DNS information, as output by the dig command, using the hosts in the /etc/resolv.conf file.
dmidecode.txtThe contents of the DMI table (system management BIOS or SMBIOS).
Requires root privileges
du.txtThe disk usage of the data directory of the broker on which the rpk debug bundle command was executed, as output by the du command.
ip.txtNetwork configuration, as output by the ip addr command.
kafka.jsonKafka metadata, such as broker configuration, topic configuration, offsets, groups, and group commits.
lspci.txtPCI buses and the devices connected to them.
ntp.txtThe NTP clock delta (using ntppool as a reference) and round trip time of the broker on which the rpk debug bundle command was executed.
/procCPU details of the broker on which the rpk debug bundle command was executed.
The directory includes a cpuinfo file with CPU information such as processor model, core count, cache size, and frequency, as well as an interrupts file that contains IRQ distribution across CPU cores.
redpanda.logThe Redpanda logs written to journald. If --logs-since and/or --logs-until are passed, then only the logs within the given timeframe are included.
prometheus-metrics.txtThe local broker`s Prometheus metrics, fetched through its admin API.
redpanda.yamlThe Redpanda configuration file of the broker on which the rpk debug bundle command was executed.
Sensitive data is removed and replaced with (REDACTED).
resource-usage.jsonRedpanda resource usage data, such as CPU usage and free memory available.
ss.txtData about active sockets, as output by the ss command.
syslog.txtThe kernel logs ring buffer, as output by the syslog command.
top.txtInformation about the running processes, as output by the top command.
vmstat.txtVirtual memory statistics, as output by the vmstat command.

Examples

Collect Redpanda logs from a specific timeframe

rpk debug bundle --logs-since "2022-02-01" --logs-size-limit 3MiB

Use a custom Kubernetes namespace

rpk debug bundle --namespace redpanda-namespace

What do you like about this doc?




Optional: Share your email address if we can contact you about your feedback.

Let us know what we do well: