17 lines
716 B
Plaintext
17 lines
716 B
Plaintext
|
# syslog-ng, format all json into messages
|
||
|
# https://www.syslog-ng.com/technical-documents/doc/syslog-ng-open-source-edition/3.23/administration-guide/63#TOPIC-1268643
|
||
|
|
||
|
@version: 3.30
|
||
|
@include "scl.conf"
|
||
|
|
||
|
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no);
|
||
|
dns_cache(no); owner("root"); group("adm"); perm(0640);
|
||
|
stats_freq(0); bad_hostname("^gconfd$"); frac-digits(6);
|
||
|
};
|
||
|
|
||
|
source s_sys { system(); internal();};
|
||
|
|
||
|
destination d_mesg { file("/var/log/messages" template("$(format-json time=\"$UNIXTIME\" facility=\"$FACILITY\" host=\"$LOGHOST\" ident=\"$PROGRAM\" pid=\"$PID\" level=\"$PRIORITY\" message=\"$MESSAGE\")\n")); };
|
||
|
|
||
|
log { source(s_sys); destination(d_mesg); };
|