Hello Group:

   I am trying to determine the best way to transform the field names of a simple JSON object that is rawmsg.  The objects are fluid having both numeric and string content, but are always in the form...

        { "aStr": "aString","bStr": "bString","cNum": 0,"dStr": "cString" }

   I need to add a prefix "ny_" to the field names such that the result would be...

        { "ny_aStr": "aString","ny_bStr": "bString","ny_cNum": 0,"ny_dStr": "cString" }

   I have a sed script with extractions that can do this transformation...

's/\([^"]\+\)"\([^"]\+\)":/\1"ny_\2":/g'

   ...but I don't know if it's possible to integrate that into a template with the property replacer, or if there's a better cleaner way to do it.

   Any and all recommendations are greatly appreciated.

Regards, John
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to