I just managed to get my Logstash config working with v6.0... but I don't understand why it's working and when it doesn't.
Original config (does not work):
elasticsearch {
hosts => ["rockserver1.lan"]
index => "bro-%{[@meta][event_type]}-%{+YYYY.MM.dd}"
document_type => "doc"
manage_template => false
}
Gives:
[2018-01-21T18:23:18,031][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"bro-network", :_type=>"doc", :_routing=>nil}, #<LogStash::Event:0x1cb38cc0>], :response=>{"index"=>{"_index"=>"bro-network", "_type"=>"doc", "_id"=>"eE71GWEBaJkcJV312X_a", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [bro-network] as the final mapping would have more than 1 type: [doc, network]"}}}}
Working Config:
elasticsearch {
hosts => ["rockserver1.lan"]
index => "bro"
document_type => "doc"
manage_template => false
}
Why does removing the dynamic indexing fix the problem and how does that relate to the error message?