| name | clickhouse-debug-bundle |
| description | Collect ClickHouse diagnostic data — system tables, query logs, merge status,
and server metrics for support tickets and troubleshooting.
Use when investigating persistent issues, preparing debug artifacts,
or collecting evidence for ClickHouse support.
Trigger: "clickhouse debug", "clickhouse diagnostics", "clickhouse support bundle",
"collect clickhouse logs", "clickhouse system tables".
|
| allowed-tools | Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","database","analytics","clickhouse","olap"] |
| compatible-with | claude-code |
ClickHouse Debug Bundle
Overview
Collect comprehensive diagnostic data from ClickHouse system tables for
troubleshooting performance issues, merge problems, or support escalation.
Prerequisites
- Access to ClickHouse with
system.* table read permissions
curl or clickhouse-client available
Instructions
Step 1: Server Health Overview
SELECT
version() AS version,
uptime() AS uptime_seconds,
formatReadableTimeDelta(uptime()) AS uptime_human,
currentDatabase() AS current_db;
SELECT metric, value, description
FROM system.metrics
WHERE metric IN (
'Query', 'Merge', 'PartMutation', 'ReplicatedFetch',
'TCPConnection', 'HTTPConnection', 'MemoryTracking',
'BackgroundMergesAndMutationsPoolTask'
);
Step 2: Disk and Table Health
SELECT
database,
table,
formatReadableSize(sum(bytes_on_disk)) AS disk_size,
sum(rows) AS total_rows,
count() AS active_parts,
max(modification_time) AS last_modified
FROM system.parts
WHERE active
database,
(bytes_on_disk)
LIMIT ;
database, , () parts
system.parts active
database,
parts
parts ;
name,
path,
formatReadableSize(total_space) total,
formatReadableSize(free_space) ,
round(free_space total_space , ) free_pct
system.disks;