Skip to main content
Skip to main content
Edit this page

system.keeper_cluster

Querying in ClickHouse Cloud

The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the clusterAllReplicas function. See here for further details.

Description

This table does not exist if this node is not configured to run an in-process ClickHouse Keeper. It contains one row per Raft cluster member, fusing static cluster topology (from the Raft configuration) with the local node's own log position.

Every node fills exactly one last_log_index value — the row matching its own server_id. Peer log positions are not surfaced here because they are tracked only on the leader and that view is not symmetric across the cluster.

Columns

  • server_id (Int32) — Raft server id of this cluster member.
  • host (String) — Host parsed from the endpoint (prefix before the last colon).
  • endpoint (String) — Raw Raft endpoint as configured (host:port).
  • is_observer (Bool) — true if this member is a non-voting observer, configured via <can_become_leader>false</can_become_leader>.
  • priority (Int32) — Raft priority of this member; higher values are preferred during leader election.
  • is_leader (Bool) — true if this member is the current Raft leader.
  • is_self (Bool) — true if this row describes the local Keeper node.
  • last_log_index (Nullable(UInt64)) — Highest log index in the local Raft log store on this node. Populated only on the row matching the current node (is_self = true); NULL for other rows.

Example:

SELECT * FROM system.keeper_cluster ORDER BY server_id;
┌─server_id─┬─host──┬─endpoint───┬─is_observer─┬─priority─┬─is_leader─┬─is_self─┬─last_log_index─┐
│         1 │ node1 │ node1:9234 │ false       │        3 │ true      │ true    │             42 │
│         2 │ node2 │ node2:9234 │ false       │        2 │ false     │ false   │           ᴺᵁᴸᴸ │
│         3 │ node3 │ node3:9234 │ true        │        1 │ false     │ false   │           ᴺᵁᴸᴸ │
└───────────┴───────┴────────────┴─────────────┴──────────┴───────────┴─────────┴────────────────┘