#查看集群状态
http://ip:9200/_cluster/health?pretty
{
"cluster_name": "test-es", //集群名称
"status": "green", // 集群状态 分为green、yellow和red。
"timed_out": false, //
"number_of_nodes": 5, // 节点数量
"number_of_data_nodes": 5,// 数据节点
"active_primary_shards": 30,// 主分片数量
"active_shards": 63, //激活分片数量
"relocating_shards": 0, //正在分配的分片
"initializing_shards": 0, //正在初始化的分片
"unassigned_shards": 0, //未分配的分片数
"delayed_unassigned_shards": 0, //延迟未分配的分片数
"number_of_pending_tasks": 0,//是指主节点创建索引并分配shards等任务,如果该指标数值一直未减小代表集群存在不稳定因素
"number_of_in_flight_fetch": 0,//
"task_max_waiting_in_queue_millis": 0,//
"active_shards_percent_as_number": 100//集群分片健康度,活跃分片数占总分片数比例。
}