altinity-expert-clickhouse-storage
Installation
SKILL.md
Storage and disk usage analysis
Answers "where is the disk going, is the data compressed well, and is the disk keeping up?" from system.disks, system.parts, system.columns, system.detached_parts, system.storage_policies, system.asynchronous_metrics, system.query_log and system.part_log.
Run altinity-expert-clickhouse-connection first if the connection mode, cluster and time window are not yet established.
Query packs
checks.sql— 19 checks: disk free space with severity, size by database and by table, usage by path, overall and per-table compression ratio, columns compressing worse than 2x, part size distribution, small-part detection, Wide vs Compact part mix, disk IO metrics, recent IO from the query log, the heaviest IO queries, system log disk usage, detached parts with reasons, storage policies and the tables using them, what grew in the last hour, and merge throughput as a proxy for disk speed. Check storage-19 needssystem.part_log; skip it when that table is absent.reference.md— background (settings, sizing, anti-patterns); read only when you need to explain a recommendation.
How to run the query packs
- Read each pack file from this skill's directory (the skill loader prints the directory path).
- Run statements one at a time, never a whole file. Statements end with
;and start with a-- @check <id> <title>header; keep the id with its result. - Honor
-- @requires: skip the statement when the named table is missing, whenkeeperis required and the server has no Keeper/ZooKeeper, or when the version condition is not met. List skipped ids with the reason. - Keep
{cluster}as written when a cluster macro exists; otherwise apply the connection skill's rewrite rule. Any other{placeholder}is a template variable: substitute a real value first or skip the statement. - On an error, record the check id and the first line of the error, then continue. Only for
UNKNOWN_IDENTIFIER, runDESCRIBE TABLE system.<table>and drop the missing column. - A
severitycolumn is the verdict for that row. Copy it; do not re-grade.