I would like to trim leading and trailing spaces from the msg field using rsyslog. I read it has functions called rtrim and ltrim but I can't find any explanation of how to use functions in RainierScript. I would really appreciate if someone can show an example of these functions. My current config is like this:
module(load="imudp") input(type="imudp" port="514" ruleset="forward") template(name="RFC5424_IP" type="string" string="<%PRI%>1 %timegenerated:::date-rfc3339% %fromhost-ip% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%" ) ruleset(name="forward") { action(type="omfwd" protocol="tcp" target="127.0.0.1" port="40514" Template="RFC5424_IP" TCP_Framing="octet-counted" ) }