Logstash报错: Could not index event to Elasticsearch_懵懂无知的蜗牛的博客-CSDN博客
集群写入_es 7.2 生产集群 index 无数据写入故障定位_镝不咸的博客-CSDN博客
查看 logstsh 日志报错提示如下
Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"apps_wms-2020.07.16", :routing=>nil, :_type=>"_doc"}, #<: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 } }}