system.clusters
Contains information about clusters available in the config file and the servers in them.
Columns:
- cluster(String) — The cluster name.
- shard_num(UInt32) — The shard number in the cluster, starting from 1. May change due to cluster modification.
- shard_name(String) — The name of the shard in the cluster.
- shard_weight(UInt32) — The relative weight of the shard when writing data.
- replica_num(UInt32) — The replica number in the shard, starting from 1.
- host_name(String) — The host name, as specified in the config.
- host_address(String) — The host IP address obtained from DNS.
- port(UInt16) — The port to use for connecting to the server.
- is_local(UInt8) — Flag that indicates whether the host is local.
- user(String) — The name of the user for connecting to the server.
- default_database(String) — The default database name.
- errors_count(UInt32) — The number of times this host failed to reach replica.
- slowdowns_count(UInt32) — The number of slowdowns that led to changing replica when establishing a connection with hedged requests.
- estimated_recovery_time(UInt32) — Seconds remaining until the replica error count is zeroed, and it is considered to be back to normal.
- database_shard_name(String) — The name of the- Replicateddatabase shard (for clusters that belong to a- Replicateddatabase).
- database_replica_name(String) — The name of the- Replicateddatabase replica (for clusters that belong to a- Replicateddatabase).
- is_active(Nullable(UInt8)) — The status of the- Replicateddatabase replica (for clusters that belong to a- Replicateddatabase): 1 means "replica is online", 0 means "replica is offline",- NULLmeans "unknown".
- name(String) - An alias to cluster.
Example
Query:
Result:
See Also
