<div dir="auto">The timestamp is probably best formatted using $ISODATE.</div><div class="gmail_extra"><br><div class="gmail_quote">On May 31, 2017 10:16 AM, "Francesco Rolando" <<a href="mailto:ogekuri@gmail.com">ogekuri@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi all,<br></div>I'm working with Sawmill log collector that it's able to import the Syslog-NG logs.<br><br></div>I have to export logs with a specific template() to have them corretly imported into Sawmill.<br><br></div>Here the regular expression used to match syslog-ng lines inside the Sawmill parser (that seem coded by "BalaBit IT Security"):<br>'^([0-9][0-9][0-9][0-9]-[0-9][<wbr>0-9]-[0-9][0-9])T([0-9][0-9]:[<wbr>0-9][0-9]:[0-9][0-9])[-+][0-9]<wbr>[0-9]:*[0-9][0-9] ([^ ]+) ([^ ]+) ([^ ]+) (.*)$'<br></div><div>where matches are imported as:<br>1- date<br>2- time<br>3- logging_device<br>4- syslog_message_type<br>5- syslog_priority<br>6- v.syslog_message</div><div><div><div><div><div><div><div><div><div class="m_-7252062833950994625gmail_signature"><div dir="ltr"><div><br></div><div>I have partially re-create the template() string but I still have a couple of doubts:<br>template("${YEAR}-${MONTH}-${<wbr>DAY}T${HOUR}:${MIN}:${SEC}+??:<wbr>?? ${SOURCEIP} ${PROGRAM} ${PRIORITY} ${MSG}\n")<br><br></div><div>Make sense $PROGRAM as "message type"? <br>And do you have any ideas for the question marks? <br><br></div><div>Any help is appreciated. Thank you.<br><br></div><div>-- <br></div><div>Saluti,<br></div><div>Francesco.<br clear="all"></div></div></div></div>
</div></div></div></div></div></div></div></div>
<br>______________________________<wbr>______________________________<wbr>__________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/<wbr>mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/<wbr>support/documentation/?<wbr>product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/<wbr>syslog-ng-faq</a><br>
<br>
<br></blockquote></div></div>