cluster-operations

Automate distributed DDL, node lifecycle, and replication recovery for ClickHouse clusters.

255|42|Updated Nov 16, 2023
One-click install
npx skills add https://github.com/chmonitor/chmonitor --skill cluster-operations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cluster-operations
Source: https://github.com/chmonitor/chmonitor/tree/main/.agents/skills/cluster-operations
Command: npx skills add https://github.com/chmonitor/chmonitor --skill cluster-operations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing self-hosted ClickHouse clusters requires manual, error-prone work for distributed DDL propagation, node scaling, replication recovery, and infrastructure migrations, leading to downtime and data inconsistency if executed incorrectly.

Core Features & Use Cases

  • Distributed DDL & Table Management: Automate schema changes across all shards with ON CLUSTER commands, configure distributed table sharding and read routing for optimal query performance.
  • Node Lifecycle Operations: Safely add or remove cluster nodes, handle automatic data sync for replicated tables, and drain replication queues before decommissioning nodes to avoid data loss.
  • Cluster Recovery & Migration: Restart failed replicas, reshard data with minimal disruption, and migrate from ZooKeeper to ClickHouse Keeper without extended downtime. Use case: For example, when scaling a ClickHouse cluster to handle a 2x increase in query traffic, use this skill to add new nodes, rebalance distributed table shards, and verify replication health without interrupting active workloads.

Quick Start

Use the cluster-operations skill to add a new ClickHouse node to your existing cluster and rebalance distributed table shards to handle increased query load.

Frequently Asked Questions about cluster-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate distributed DDL propagation across ClickHouse shards?

Automate distributed DDL propagation across ClickHouse shards by applying ON CLUSTER schema changes to ensure coordinated modifications and prevent data inconsistency. This handles distributed table sharding and read routing for optimal query performance.

What is the best way to add or remove ClickHouse cluster nodes without data loss?

Safely add or remove ClickHouse cluster nodes by handling automatic data sync for replicated tables and draining replication queues before decommissioning nodes. This node lifecycle management prevents data loss during scaling operations.

Can I migrate from ZooKeeper to ClickHouse Keeper without extended downtime?

Yes, you can migrate from ZooKeeper to ClickHouse Keeper without extended downtime using automated cluster recovery and migration techniques. This migration maintains replication integrity across all shards and replicas throughout the transition.

How does ClickHouse resharding work with minimal disruption to active workloads?

ClickHouse resharding works with minimal disruption by automatically rebalancing distributed table shards while maintaining replication integrity. This allows you to handle increased query traffic and scale cluster capacity without interrupting active workloads.

How do I restart failed ClickHouse replicas and verify replication health?

Restart failed ClickHouse replicas and verify replication health through automated cluster recovery operations that check replication queues and data consistency across all shards. This ensures coordinated recovery and prevents ongoing data inconsistency.

Do I need to drain replication queues before decommissioning ClickHouse nodes?

Yes, you must drain replication queues before decommissioning ClickHouse nodes to avoid data loss during node lifecycle operations. This draining process ensures all replicated tables are fully synchronized before the node is removed from the cluster.