Hello,
Trying to send json formatted log messages to a remote server.
Disto provided rsyslog 5.8.10
*using*
$template LogstashJsonFormat, "{ \
\"timestamp\":\"%timereported:::date-rfc3339,json%\",\
\"syslog_hostname\":\"%hostname:::json%\",\
\"syslog_pri\":\"%pri:::json%\",\
\"syslog_tag\":\"%syslogtag:::json%\",\
\"syslog_msg\":\"%msg:::json%\"\
}\n"
*output*:
{ "timestamp":"2012-10-03T19:26:05.643359-04:00","syslog_hostname":"
srv1.domain.net","syslog_pri":"46","syslog_tag":"rsyslogd:","syslog_msg":"
[origin software="rsyslogd" swVersion="5.8.10" x-pid="7846" x-info="
http://www.rsyslog.com"] start"
The msg is not a correct string for json format, it has double quotes in
it. Should not the properties json option escape them?
If not how can I do this with a regex option?
Thanks
_______________________________________________
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.