system.zookeeper_info
在 ClickHouse Cloud 中进行查询
该系统表中的数据保存在 ClickHouse Cloud 中每个节点的本地。因此,如需获得所有数据的完整视图,需要使用 clusterAllReplicas 函数。更多详情请参阅此处。
此表输出关于 ZooKeeper 的综合内部信息,节点列表取自配置。
列:
zookeeper_cluster_name(String) — ZooKeeper 集群的名称。host(String) — ClickHouse 所连接的 ZooKeeper 节点的主机名或 IP 地址。port(UInt16) — ClickHouse 连接到的 ZooKeeper 节点的端口号。index(Nullable(UInt8)) — ClickHouse 所连接的 ZooKeeper 节点的索引。该索引来自 ZooKeeper 配置。如果未连接,此列为 NULL。is_connected(Nullable(UInt8)) — 指示是否已连接到 ZooKeeper。is_readonly(UInt8) — 是否只读。version(String) — ZooKeeper 的版本。avg_latency(UInt64) — 平均延迟时间。max_latency(UInt64) — 最大延迟值。min_latency(UInt64) — 最小延迟值。packets_received(UInt64) — 接收的数据包数量。packets_sent(UInt64) — 已发送的数据包数量。outstanding_requests(UInt64) — 未处理请求的数量。server_state(String) — 服务器状态。is_leader(UInt8) — 是否为该 ZooKeeper 节点的 leader。znode_count(UInt64) — znode 数量。watch_count(UInt64) — watch 数量。ephemerals_count(UInt64) — 临时节点数量。approximate_data_size(UInt64) — 数据的大致大小。followers(UInt64) — 领导者的从属节点(followers)数量。此字段仅由领导节点公开。synced_followers(UInt64) — 已与主节点完成同步的 follower 数量。此字段仅在主节点上可见。pending_syncs(UInt64) — leader 节点的待同步数量。该字段仅在 leader 节点上暴露。open_file_descriptor_count(UInt64) — 当前已打开的文件描述符数量。仅在 Unix 平台上可用。max_file_descriptor_count(UInt64) — 最大文件描述符数量。仅在 Unix 平台上可用。connections(UInt64) — ZooKeeper 连接数。outstanding(UInt64) — ZooKeeper 未完成请求数。zxid(UInt64) — ZooKeeper 的 zxid。`node_count(UInt64) — ZooKeeper 节点数量。snapshot_dir_size(UInt64) — ZooKeeper 快照目录的大小。log_dir_size(UInt64) — ZooKeeper 日志目录大小。first_log_idx(UInt64) — ZooKeeper 中的首个日志索引。first_log_term(UInt64) — ZooKeeper 中的第一个日志任期。last_log_idx(UInt64) — ZooKeeper 的最新日志索引。last_log_term(UInt64) — ZooKeeper 中最后日志的任期。last_committed_idx(UInt64) — ZooKeeper 中最后一次提交的索引。leader_committed_log_idx(UInt64) — ZooKeeper leader 节点已提交日志的索引。target_committed_log_idx(UInt64) — ZooKeeper 目标端已提交日志的索引。last_snapshot_idx(UInt64) — ZooKeeper 的最新快照索引。 g