集群整体状态(cluster health)
在ES中有很多的可被监视的统计数据,其中最重要的是cluster health,cluster health使用green,yellow,red来标记。
使用如下请求:
GET /_cluster/health
在一个没有index的空的cluster中,以上请求返回
{
"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
}
标记1出的status字段是我们关心的数据。
这个status 字段表示了ES的整体指标。颜色的含义如下:
green:所有的prinary shards和replica shareds都是激活的
yellow:所有的prinary shards和部分replica shareds是激活的
red:部分prinary shards是激活的
剩下的章节中,将会解释primary shard和replica shard的含义,并解释上述每种颜色的实际的影响。
原文:http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/cluster-health.html

浙公网安备 33010602011771号