Remove double quotes from the field in Logstash message

raw=>"{ "device" : " - Gignet1/2/4 · "f1-sf2:[7]" test abc " }"

How to remove doublequotes for "f1-sf2:[7]" for the field "device".

Im getting error while parsing this as json
:exception=>#<LogStash::Json::ParserError: Unexpected character ('f' (code 102)): was expecting comma to separate OBJECT entries

at [Source: [B@3228c27a; line: 1, column: 136]>, :level=>:warn}

That is to be expected, since it is not valid JSON. You may be able to fix it using mutate+gsub. We cannot give you a regexp to use from a single example.

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