I am aware of the create
action but when I use it a horrendous WARN log is printed in the logstash screen. The solution of create
would fit perfect if it wasn't for it. So I've been wondering if there is another way to approach this case.
This is the log I want to get rid off by the way:
[2023-06-20T12:31:33,383][WARN ][logstash.outputs.elasticsearch][devices_apps][a8f9564896360f471059c7c3b107c8cf03e5a0274a1f4e663ea2a1ce836b72bb] Failed action {:status=>409, :action=>["create", {:_id=>"b1a63b24/com.xxxx.calculator", :_index=>"devices", :routing=>nil}, {"access_token"=>"gjysrkjskdhkukedk", "@version"=>"1", "request"=>"completo", "body"=>{"version"=>"12.3.81", "name"=>"Calculator", "identifier"=>"com.miui.calculator", "tags"=>["system"], "buildNumber"=>"201203681", "icon"=>nil}, "tags"=>["app"], "@timestamp"=>2023-06-20T15:30:06.489467654Z, "device"=>{"id"=>"b1a63b24"}}], :response=>{"create"=>{"_index"=>"devices", "_id"=>"b1a63b24/com.miui.calculator", "status"=>409, "error"=>{"type"=>"version_conflict_engine_exception", "reason"=>"[b1a63b24/com.miui.calculator]: version conflict, document already exists (current version [1])", "index_uuid"=>"dQw4wZ2eQZScKG300QKMCw", "shard"=>"0", "index"=>"devices"}}}}
Appreciate the help.