登录 kibana 查看无新数据写入。所有的 index 都没有生成的新的数据。
查看 logstsh 日志报错提示如下
Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"apps_wms-2020.07.16", :routing=>nil, :_type=>"_doc"}, #<LogStash::Event:0x682b3a66>], :response=>{"index"=>{"_index"=>"apps_wms-2020.07.16", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [4000]/[4000] maximum shards open;"}}}}
es 集群默认有分片限制最大 4000 ,导致 logstash 写入 es 的 index 数据异常
调整 es 集群默认分片限制 index写入恢复正常
PUT /_cluster/settings
{
"transient": {
"cluster": {
"max_shards_per_node":10000
}
}
}