Keep double quote on JSON trace

(Jonathan Wadin) #1


I have a log file which produces a json content on one line well formatted. When I print it with the output { stdout { codec => rubydebug } } I see the correct Json with the fields double quote surround correctly parsed into "message". When I try to pass this json to a command line parameter through the plugin-exec-output the json is passed without the double quote field, example :
Log : { "param1": "valeur", "param2" : "valeur2" }
Message (stdout rubydebug) : "message" => "{ "param1": "valeur", "param2": "valeur2"}
output exec : command => "binary.exe "%{message}""
execute : binary.exe { param1: valeur, param2: valeur2 } without the double quote which surround the parameter and values.

Any explanation?

(system) #2

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