altinity-expert-clickhouse/skills/altinity-expert-clickhouse-metrics/SKILL.md
Real-time monitoring of ClickHouse metrics, events, and asynchronous metrics. Use for load average, connections, queue monitoring, and resource saturation.
npx skillsauth add altinity/skills altinity-expert-clickhouse-metricsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Real-time monitoring of ClickHouse metrics, events, and asynchronous metrics.
Run all queries from checks.sql in this skill's directory and analyze the results.
system.metrics - Current gauge valuessystem.events - Cumulative counters since restartsystem.asynchronous_metrics - System-level metricssystem.metric_log - Historical metricssystem.asynchronous_metric_log - Historical async metrics-- Find metrics by pattern
select * from system.metrics where metric like '%pattern%'
select * from system.asynchronous_metrics where metric like '%pattern%'
select * from system.events where event like '%pattern%'
| Finding | Load Module | Reason |
|---------|-------------|--------|
| High memory metrics | altinity-expert-clickhouse-memory | Memory analysis |
| High replica delay | altinity-expert-clickhouse-replication | Replication issues |
| High parts count | altinity-expert-clickhouse-merges | Merge backlog |
| High load average | altinity-expert-clickhouse-reporting | Query analysis |
| High connections | altinity-expert-clickhouse-reporting | Connection analysis |
| Metric | Warning | Critical |
|--------|---------|----------|
| ReadonlyReplica | - | > 0 |
| Query | > 75% max | > 90% max |
| MemoryResident | > 80% RAM | > 90% RAM |
| MaxPartCountForPartition | > parts_to_delay | > parts_to_throw |
| ReplicasMaxAbsoluteDelay | > 5 min | > 1 hour |
| LoadAverage1 | > CPU count | > 2x CPU count |
ClickHouse exposes metrics at :9363/metrics in Prometheus format when enabled.
tools
Read-only ClickHouse security audit expert for live or exported systems. Use when assessing ClickHouse security posture, reviewing users, roles, grants, settings profiles, row policies, table functions, external sources, table engines, executable UDFs, audit logs, named collections, password hash hygiene, SQL SECURITY DEFINER, impersonation, TLS/network exposure, Keeper/interserver security, encryption at rest, backups, the HTTP interface surface, cluster security, or version-specific ClickHouse security behavior. Diagnoses from SQL/system tables, supplied configuration files, query logs, access metadata, and ClickHouse/Altinity documentation.
tools
Diagnose and resolve ClickHouse grant and authentication errors, especially after upgrades. Use when queries fail with ACCESS_DENIED/NOT_ENOUGH_PRIVILEGES, AUTHENTICATION_FAILED/WRONG_PASSWORD/REQUIRED_PASSWORD, or ON CLUSTER privilege errors; when system.* or INFORMATION_SCHEMA access is denied; or when grant behavior changes after version upgrades.
tools
Profile a ClickHouse cluster via MCP and emit a per-cluster "analyst" Skill the user can save in claude.ai. Activate when the user asks to "profile this ClickHouse", "generate an analyst skill", "build a schema guide", "map the data in this cluster", or regenerate an existing cluster-analyst Skill after schema changes. Works against any ClickHouse with read-only SELECT/SHOW/DESCRIBE access via an `execute_query` MCP tool (e.g. the Altinity MCP server). Outputs a 5-file markdown bundle plus a README.
tools
Diagnose ClickHouse disk usage, compression efficiency, part sizes, and storage bottlenecks. Use for disk space issues and slow IO.