[syslog-ng] insert timezone into log

Asif Iqbal vadud3 at gmail.com
Wed Apr 25 16:49:21 UTC 2018


How do I change the time in the log to append a timezone. Timestamp should
be based on generateTime=1523620861 which is in the log

So today the time in the shows like this

    Apr 25 16:46:51 host.example.net .., generateTime=1524674663, ...

I like to change it like below

    2018-04-25T16:46:55+0000 host.example.net ...,generateTime=1524674663,
....





{"PROGRAM":"alarmLog,","PRIORITY":"notice","MESSAGE":"applianceName=KING-MER-50-PRI,
tenantName=king, alarmType=vrrp-v3-proto-error, alarmKey=0|vni-0/3.0,
generateTime=1523620861, applianceId=1, vsnId=0, tenantId=4,
alarmCause=causeOther, alarmClearable=no, alarmClass=new, alarmKind=root,
alarmEventType=equipmentAlarm, alarmSeverity=indeterminate,
alarmOwner=tenant, alarmSeqNo=36657, alarmText=\"vni-0/3.0\",
siteName=","HOST":"host.example.net","FACILITY":"user","DATE":"Apr 13
04:01:22"}
-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20180425/1a6b748c/attachment.html>


More information about the syslog-ng mailing list