/clickhouse-pack:clickhouse-observabilityfrom clickhouse-pack
Sets up ClickHouse monitoring with Prometheus metrics, Grafana dashboards, system table queries, and alerting for query performance, merge health, and resource usage.
Ships in clickhouse-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up comprehensive monitoring for ClickHouse using built-in system tables,
Prometheus integration, Grafana dashboards, and alerting rules. The workflow
layers four signal sources: system.* tables (always available, zero
dependencies), a Prometheus scrape endpoint, application-level client
instrumentation, and alert rules that fire on the failure modes that actually
page an on-call — high error rate, latency creep, merge backlog, and resource
exhaustion.
Deep configs live in references/ so this file stays a fast, followable map.
system.* table accessStart with zero dependencies — the system.* tables already hold everything.
Run this for an instant server-health read:
SELECT
(SELECT count() FROM system.processes) AS running_queries,
(SELECT value FROM system.metrics WHERE metric = 'MemoryTracking') AS memory_bytes,
(SELECT count() FROM system.merges) AS active_merges;
Query throughput, insert rates, and per-table part counts (the merge-health
signal), plus a full table of which system.* table to poll at what frequency:
system table queries & reference.
ClickHouse Cloud exposes a managed Prometheus endpoint (Basic auth with a Cloud
API key); self-hosted uses the built-in :9363 /metrics endpoint enabled in
config.xml. Write the scrape config to your prometheus.yml. Full Cloud +
self-hosted scrape configs and the config.xml block:
Prometheus scrape config & Grafana dashboards.
Server metrics show what ClickHouse does; client metrics attribute latency,
error codes, and insert volume to your own code. Wrap queries in a prom-client
histogram/counter and expose /metrics. Full instrumentation + structured
logging: application-level instrumentation.
Panels for QPS, P50/P95/P99 latency, error rate, and insert throughput are in
the Grafana dashboards reference. Or import
the official community dashboard: https://grafana.com/grafana/dashboards/23415.
Write Prometheus alert rules for the five production failure modes (error rate, latency, part count, memory, disk) to a rules file loaded by AlertManager. Full rule set plus per-alert tuning notes: Prometheus alert rules.
Applying this skill produces a set of monitoring config artifacts you write to your infrastructure repo:
prometheus.yml — scrape config targeting your ClickHouse endpointclickhouse-alerts.yml — the five-rule alert group loaded by AlertManager23415 or the custom JSON panels)clickhouse_query_duration_seconds,
clickhouse_query_errors_total, and clickhouse_insert_rows_totalsystem.* queries for on-demand health snapshots| Issue | Cause | Solution |
|---|---|---|
| Metrics endpoint empty | Prometheus not configured | Enable /metrics in config |
| High cardinality alerts | Too many label values | Reduce label cardinality |
| Missing query_log data | Logging disabled | Set log_queries = 1 in config |
| Dashboard gaps | Scrape interval too long | Use 10-15s scrape interval |
Snapshot server health right now — run the Step 1 query against any instance
with system.* access; no exporter or scrape needed. See
system-tables.md for throughput and merge-health
variants.
Alert when merges fall behind — the ClickHouseTooManyParts rule fires when
a table exceeds 300 active parts for 10 minutes, the classic
inserts-outpacing-merges signal. Full rule + tuning guidance:
alerting.md.
Attribute slow queries to your service — wrap calls in instrumentedQuery()
so P95 latency and error codes land in Prometheus labeled by query type. See
instrumentation.md.
clickhouse-incident-runbook skill.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/clickhouse-ci-integrationRun ClickHouse integration tests in CI with GitHub Actions and Docker
containers. Use when setting up automated testing against a real ClickHouse
instance, configuring CI pipelines, or implementing schema validation in CI.
Trigger with "clickhouse CI", "clickhouse GitHub Actions", "clickhouse
integration tests", "test clickhouse in CI", "clickhouse automated testing".
/clickhouse-common-errorsDiagnose and fix the top 15 ClickHouse errors — query failures, insert problems,
memory limits, and merge issues.
Use when a ClickHouse query or insert throws an exception, a server-side error
appears in logs, or a failed query needs root-cause analysis.
Trigger with "clickhouse error", "fix clickhouse", "clickhouse not working",
"debug clickhouse", "clickhouse exception", "clickhouse syntax error".
/clickhouse-core-workflow-aDesign ClickHouse schemas with MergeTree engines, ORDER BY keys, and
partitioning.
Use when creating new tables, choosing an engine, designing sort keys, or
modeling data for analytical workloads on ClickHouse or ClickHouse Cloud.
Trigger with "clickhouse schema design", "clickhouse table design",
"clickhouse ORDER BY", "clickhouse partitioning", "MergeTree table".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin clickhouse-packOther plugins' skills for the same job