TUI interface for debugging and monitoring ClickHouse databases with top-like views and flamegraph analysis
chdig is a terminal user interface (TUI) tool for debugging and monitoring ClickHouse databases. It provides a top-like interface that aggregates ClickHouse's introspection capabilities into a single interactive view, making it easier to diagnose performance issues and monitor database activity without remembering numerous system tables and queries.
The tool includes flamegraph visualization for CPU, memory, and live profiling directly in the terminal using flamelens integration. It supports sharing flamegraphs via pastila.nl and speedscope, exporting Perfetto traces, and visualizing query execution pipelines. Users can share logs and analysis results through integrated web services, making collaboration on performance issues more accessible.
chdig supports cluster-wide monitoring with the --cluster flag to aggregate data from multiple hosts, and historical analysis using --history to include rotated system log tables. It maintains compatibility with clickhouse-client options and configuration files, including connection parameters. The tool targets database administrators, developers, and SREs who need to regularly investigate ClickHouse performance and operational issues.
# via Homebrew
brew install chdig
# via Scoop
scoop bucket add extras && scoop install extras/chdig
# via Cargo
cargo build
