docker 部署的单机版 ES 状态为 Yellow 解决办法

2020-01-14  本文已影响0人  天天向上卡索

docker 部署的单机版 ES 状态为 Yellow 解决办法

Intro

docker 部署的单机版的 ES 状态为 Yellow,在 Kibana 的管理界面看到的 index 的状态也是 Yellow,这样看起来很不舒服,如何让 Yellow 变成 Green 呢

这个问题在于单机版的 ES,是没有备份的,没有副本,设置 index 副本的数量为 0 即可

解决办法

  1. curl
curl -XPUT 'http://localhost:9200/_settings' -d '
{
    "index" : {
        "number_of_replicas" : 0
    }
}'
  1. kibana console
PUT _settings
{
    "index" : {
        "number_of_replicas" : 0
    }
}

更新后再看 es 的状态,可以访问 /_cluster/health 获取 ES 集群健康状态

Reference

上一篇 下一篇

猜你喜欢

热点阅读