一早回来查看kibana,发现今天的index没有创建。开始排查:
- 查看ES集群状态:正常
- 查看Logstash状态:运行状态正常。再查看日志发现有报错 this action would add [6] total shards, but this cluster currently has [3000]/[3000] maximum shards open
原因:
ES版本为7.10,集群默认配置的每节点分片数为1000,而集群为3节点,所以总分片数限制在了3000
处理:
调整集群配置
#Dev Tools
PUT /_cluster/settings
{
"persistent": { #永久配置
"cluster": {
"max_shards_per_node":10000
}
}
}
#shell 命令
curl -XPUT "http://localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'{ "persistent": { "cluster": { "max_shards_per_node":10000 } }}'