Issue with removing tag

we are having the <system-out><![CDATA[]]></system-out> tag in our XML File. Due to this tag it could not index and throwing the below Error:

"error"=>{"type"=>"illegal_argument_exception", "reason"=>"can't merge a non object mapping [theXML.testsuite.testcase.system-out] with an object mapping"}}}}

so,tried the below snippet for removing the mentioned tag but not able to remove the tag.

logStash snippet:

ruby {
code =>"
hash = event.to_hash
hash.each do |k,v|
if v == '{}'
event.remove(k)
end
end
"
}

Can you please suggest on this?

Actually the issue is system-out field has 2 types of values - it may have value or maybe empty.
Can you suggest a solution how can it be processed without error or if there is a may to delete the field at all places.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.