elasticsearch-yellow

Elasticsearch 集群 Yellow

现象

集群健康状态为 yellow,主分片可用但副本未分配;写入和查询可能正常,但可靠性下降,节点故障时可能丢数据。

快速定位

curl -s 'http://es:9200/_cluster/health?pretty'
curl -s 'http://es:9200/_cat/shards?v' | grep UNASSIGNED
curl -s 'http://es:9200/_cluster/allocation/explain?pretty'

查看节点和磁盘:

curl -s 'http://es:9200/_cat/nodes?v'
curl -s 'http://es:9200/_cat/allocation?v'

常见根因

修复

相关命令