I am trying to understand the difference between these two errors:
[2020-06-05T13:51:34,267][WARN ][logstash.outputs.elasticsearch][filebeat] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"filebeat-ilm-6.5.1", :routing=>nil, :_type=>"_doc"}, #LogStash::Event:0x7cd8e6f9], :response=>{"index"=>{"_index"=>"filebeat-ilm-6.5.1-2020.06.05-000006", "_type"=>"_doc", "_id"=>"bijAhHIB6QPGMv6USiAf", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"object mapping for [kubernetes.labels.app] tried to parse field [app] as object, but found a concrete value"}}}}
and this error:
{"level":"WARN","loggerName":"logstash.outputs.elasticsearch","timeMillis":1591902736087,"thread":"[filebeat]>worker1","logEvent":{"message":"Could not index event to Elasticsearch.","status":400,"action":["index",{"_index":"filebeat-ilm-6.5.1","_type":"_doc"},{"metaClass":{"metaClass":{"metaClass":{"action":"["index", {:_id=>nil, :_index=>"filebeat-ilm-6.5.1", :routing=>nil, :_type=>"_doc"}, #LogStash::Event:0x3b9ff5c7]","response":{"index":{"_index":"filebeat-ilm-6.5.1-2020.06.11-000015","_type":"_doc","id":"P9nMpHIBUCo_PZZ1DhC","status":400,"error":{"type":"illegal_argument_exception","reason":"mapper [logEvent.action] of different type, current_type [keyword], merged_type [ObjectMapper]"}}}}}}}]}}
The first one appears to be a mapper_parsing_exception
as the 2nd is a illegal_argument_exception
.
The first makes sense as we have had documents indexed with the field kubernetes.labels.app
as a string, then on rollover a document was indexed with an object nested in the kubernetes.labels.app
filed instead of a string causing the mapper parsing exception.
Why isn't the second error message a mapper_parsing_exception
as it appears to be the same issue but with field logEvent.action
?