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'
cluster.routing.allocation.* 设置。number_of_replicas: 0。_cluster/health 变为 green。curl — 集群健康、分片、分配解释elasticsearch — 集群服务ilm — 索引生命周期cat API — 节点和磁盘