chdig
TUI for ClickHouse monitoring and debugging
TLDR
SYNOPSIS
chdig [OPTIONS] [SUBCOMMAND]
DESCRIPTION
chdig provides an interactive terminal dashboard for ClickHouse, similar to how top or htop work for Linux system processes. It consolidates ClickHouse's extensive system introspection tables into a navigable TUI with flamegraph visualization directly in the terminal (CPU, real-time, memory), EXPLAIN integration for analyzing query plans and pipelines, cluster mode for aggregating queries across all shards, and historical mode for examining rotated system log tables.
PARAMETERS
-u, --url URL
Connection URL. Also reads CHDIG_URL environment variable.--host HOST
Override host (clickhouse-client compatible).--port PORT
Override port.--user USER
Override user. Also reads CLICKHOUSE_USER.--password PASS
Override password. Also reads CLICKHOUSE_PASSWORD.--secure
Use TLS/SSL.--config FILE
ClickHouse-like config file (YAML).-C, --connection NAME
Named connection profile from config file.-c, --cluster NAME
Cluster name; enables distributed queries across shards.--history
Aggregate historical system log data using merge().-d, --delay-interval MS
Refresh interval in milliseconds (default: 30000).-g, --group-by
Group distributed queries (default in cluster mode).-b, --start TIME
Begin of time interval (default: 1 hour ago).-e, --end TIME
End of time interval.--completion SHELL
Generate shell completion script.
VIEWS
queries (default), lastqueries, slowqueries, merges, mutations, replicationqueue, replicatedfetches, replicas, tables, tableparts, errors, backups, dictionaries, serverlogs, loggers, partlog, asynchronousinserts, s3queue, azurequeue, client
KEY BINDINGS
F8 Show actions / Filter
j/k Navigate r Refresh
p Pause/resume C CPU flamegraph
R Real-time flamegraph M Memory flamegraph
S Display query y Copy query
K Kill query l Show query logs
q/Esc Back/quit Q Force quit
CAVEATS
The project is self-described as pre-alpha; keyboard shortcuts, views, and features may change without notice. Requires ClickHouse 21.2 or newer. Mouse mode is enabled by default, which interferes with standard terminal text selection; use Alt/Shift/Ctrl modifiers to select text.
HISTORY
chdig was created by Azat Khuzhin, a Principal Software Engineer at ClickHouse. Written in Rust under the MIT license. The latest version is v26.2.3. There is an ongoing effort to bundle chdig as part of ClickHouse itself.
SEE ALSO
clickhouse-client(1), htop(1), top(1)

