ansible-role-system/files/syslog-ng.conf
Denis Knauf 3beb52ad22 init
2021-04-10 22:11:19 +02:00

55 lines
1.1 KiB
Plaintext

@version: 3.19
@include "scl.conf"
# First, set some global options.
options {
chain_hostnames(off);
flush_lines(0);
use_dns(no);
use_fqdn(no);
owner("root");
group("adm");
perm(0640);
stats_freq(0);
bad_hostname("^gconfd$");
ts_format(iso);
frac_digits(6);
};
########################
# Sources
########################
# This is the default behavior of sysklogd package
# Logs may come from unix stream, but not from another machine.
#
source s_src {
system();
internal();
};
# If you wish to get logs from remote machine you should uncomment
# this and comment the above source line.
#
#source s_net { tcp(ip(127.0.0.1) port(1000)); };
########################
# Destinations
########################
destination d_local {
file("/var/log/$YEAR/$YEAR-$MONTH-$DAY"
template( "$R_ISODATE\t$PRIORITY\t$FACILITY\t$FACILITY_NUM\t$PROGRAM\t$PID\t$MSG\n")
create_dirs(yes) dir_group("syslog") dir_perm(0750) group("syslog") perm(0640)
);
};
log {
source( s_src);
#destination( d_net);
destination( d_local);
};
###
# Include all config files in /etc/syslog-ng/conf.d/
###
@include "/etc/syslog-ng/conf.d/*.conf"