Example from the docs:

template(name="outfmt" type="list" option.jsonf="on") {
property(outname="@timestamp" name="timereported" dateFormat="rfc3339" format="jsonf")
         property(outname="host" name="hostname" format="jsonf")
property(outname="severity" name="syslogseverity-text" caseConversion="upper" format="jsonf") property(outname="facility" name="syslogfacility-text" format="jsonf")
         property(outname="syslog-tag" name="syslogtag" format="jsonf")
         property(outname="source" name="app-name" format="jsonf")
         property(outname="message" name="msg" format="jsonf")


I wish to generate JSON content, but instead of a text value for the timestamp field timestamp I wish to provide a numeric value instead.

Otherwise my attempts to send messages into Graylog via "GELF" format results in Graylog generating messages like this one:

WARN [GelfCodec] GELF message <PLACEHOLDER> (received from <PLACEHOLDER:35292>) has invalid "timestamp": 1520867955 (type: STRING)

Does this require that the JSON template be "built by hand" as was needed previously?

rsyslog mailing list
What's up with rsyslog? Follow
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 

Reply via email to