JSON filter gives warning that it requires a target


#1

[2018-01-06T03:41:04,492][WARN ][logstash.filters.json ] Parsed JSON object/hash requires a target configuration option {:source=>"extras", :raw=>""}

I don't have a target set because I read in the documentation that the default behavior is to put the parsed fields at the top level of the doc. Why is it warning me about this then? The warning barely ever shows up, even though it has successfully parsed that field in millions of other docs.


(Magnus Bäck) #2

It looks like the string you're attempting to parse is empty (note :raw=>"").


#3

Why does the error say it needs a target then? Shouldn't the error say "trying to parse empty string" or something?


(Magnus Bäck) #4

Parsing an empty string apparently results in a valid value (in the sense that the parsing doesn't fail), but since it's not a hash you get the generic error message in question.


(system) #5

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