現象:lostack啓動正常,logstack收集輸入redis數據,輸出到elasticsearch寫入失敗nginx
提示:去建索引 的時候elasticsearch返回404redis
[2019-11-12T11:37:29,009][WARN ][logstash.outputs.elasticsearch][main] Could not index event to Elasticsearch. {:status=>404, :action=>["index", {:_id=>nil, :_index=>"nginx-172.16.2.13-2019.11.12", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x26f38258>], :response=>{"index"=>{"_index"=>"nginx-172.16.2.13-2019.11.12", "_type"=>"doc", "_id"=>nil, "status"=>404, "error"=>{"type"=>"index_not_found_exception", "reason"=>"no such index", "resource.type"=>"index_expression", "resource.id"=>"nginx-172.16.2.13-2019.11.12", "index_uuid"=>"_na_", "index"=>"nginx-172.16.2.13-2019.11.12"}}}}express
解決方法:elasticsearch
因elasticsearch配置問題致使,action.auto_create_index: false #禁用自動建立indexui
將false改爲true便可,或者刪除這個配置,查閱官方文檔改配置是默認開啓的。spa
Auth:liucxblog
E-mail:57349220@qq.com索引
但願能幫你解決。文檔