I have setup a logstash pipeline. It works fine bringing the updates and refreshing the index. However, it throws an error while bringing updates. I am trying to understand the reasons behind.
[2020-05-25T11:59:13,962][WARN ][logstash.outputs.elasticsearch][company_listing] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"", :_index=>"contactsx", :routing=>nil, :_type=>"contactx"}, #LogStash::Event:0x56578469], :response=>{"index"=>{"_index"=>"contactsx", "_type"=>"contactx", "_id"=>"", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"if _id is specified it must not be empty"}}}}
by changing it to this "with a constant "_Z", document_id => "%{symbol}_z", there are no errors.
it seems likely you have a document with id equal to "_z". What does that document look like if check the JSON tab in an expanded event in the Discover interface of kibana?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.