Back to Clickhouse

system.clusters

docs/en/operations/system-tables/clusters.md

26.4.1.1-new1.6 KB
Original Source

Contains information about clusters available in the config file and the servers in them.

Columns:

<!--AUTOGENERATED_START--> <!--AUTOGENERATED_END-->

Example

Query:

sql
SELECT * FROM system.clusters LIMIT 2 FORMAT Vertical;

Result:

text
Row 1:
──────
cluster:                 test_cluster_two_shards
shard_num:               1
shard_name:              shard_01
shard_weight:            1
replica_num:             1
host_name:               127.0.0.1
host_address:            127.0.0.1
port:                    9000
is_local:                1
user:                    default
default_database:
errors_count:            0
slowdowns_count:         0
estimated_recovery_time: 0
database_shard_name:
database_replica_name:
is_active:               NULL

Row 2:
──────
cluster:                 test_cluster_two_shards
shard_num:               2
shard_name:              shard_02
shard_weight:            1
replica_num:             1
host_name:               127.0.0.2
host_address:            127.0.0.2
port:                    9000
is_local:                0
user:                    default
default_database:
errors_count:            0
slowdowns_count:         0
estimated_recovery_time: 0
database_shard_name:
database_replica_name:
is_active:               NULL

See Also