监控索引状态

logstash_brokers_integral_log/_stats

“search”: { “open_contexts”: 0, “query_total”: 1133, 查看指定索引的请求量

http://10.15.12.38:9200/_tasks?pretty

查看健康状态 http://10.15.12.38:9200/_cluster/health?level=shards

查看堆积任务 GET /_cat/pending_tasks

查看red原因

curl -XGET "http://10.15.12.38:9200/_cluster/allocation/explain" -H"Content-Type:application/json" -d '{
  "index": "linfenv1_lfcommunitylist",
  "shard": 0,
  "primary": true
}'

重新分片

curl -XPOST "http://10.15.12.38:9200/_cluster/reroute" -H"Content-Type:application/json" -d '
{
  "commands": [
    {
      "allocate_stale_primary": {
        "index": "shanghaiv1_shrenthouse",
        "shard": 0,
        "node": "",
        "accept_data_loss": true
      }
    }
  ]
}'

集群red解决方法 https://zhuanlan.zhihu.com/p/101608973

https://blog.csdn.net/kezhen/article/details/79379512

如何解决 Elasticsearch 中未分配的分片 http://www.dbaselife.com/project-16/doc-1301/ 还在为ES集群Red/Yellow烦恼?带你进行场景拆解 https://cloud.tencent.com/developer/article/2188681

Published At