目录
2、_cluster/state/{metrics}/{indices}
1、 GET _cluster/health
请求参数
level :查询响应,可以配合其他参数使用,【cluster、indices
、shards】
wait_for_status : 同步等待到集群满足某种状态才响应【green 、yellow 、red】
wait_for_no_relocating_shards:是否等待全部分片后再返回数据【true,false】,默认:false
wait_for_active_shards:数据同步多少分片后再返回数据【0+】,默认0
wait_for_nodes:
timeout:请求超时时间【0+】,默认是30s
响应参数
cluster_name:集群名字
status:集群状态
timed_out:是否设置超时时间
number_of_nodes:集群配置的节点数
number_of_data_nodes:集群的数据节点数
active_primary_shards:集群中主分片数量
active_shards:集群中分片数量=主分片数量+副分片数量
unassigned_shards:未分片数量,一般在集群启动或者新建索引的时候出现