1.查看集群健康状态
GET /_cluster/health
{
"cluster_name": "elasticsearch",
"status": "green",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 0,
"active_shards": 0,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 0
}
status 值表示含义:
green所有的主分片和副本分片都正常运行。
yellow所有的主分片都正常运行,但不是所有的副本分片都正常运行。
red有主分片没能正常运行。
本文介绍如何通过Elasticsearch API查询集群的健康状态,并解释返回的状态颜色含义:绿色表示所有主分片和副本分片正常运行;黄色表示所有主分片正常运行,但部分副本分片未运行;红色表示有主分片未能正常运行。
483

被折叠的 条评论
为什么被折叠?



