2014/06/05

設定 Syslog-ng config 輸出格式為 IETF syslog protocol standard (RFC5424)

版本:syslog-ng 3.3.4

# 預設
destination d_syslog { file("/var/log/syslog");};
輸出:Jun  5 18:00:31 140.116.xxx.xxx test test by CT

# 加入flags
destination d_syslog { file("/var/log/syslog", flags(syslog-protocol));};
輸出:<134>1 2014-06-05T19:01:32+08:00 140.116.xxx.xxx test - - - test by CT


參考:
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.3-guides/en/syslog-ng-ose-v3.3-guide-admin-en/html/reference_destination_file.html

沒有留言:

張貼留言