From c85c7450e932c80f5b69cc43ff40a9279f94c9ad Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 24 Mar 2016 14:45:09 -0300 Subject: Make config a bit closer to defaults for jessie --- templates/syslog-ng.conf_jessie.erb | 72 ++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/templates/syslog-ng.conf_jessie.erb b/templates/syslog-ng.conf_jessie.erb index 109e0da..953295d 100644 --- a/templates/syslog-ng.conf_jessie.erb +++ b/templates/syslog-ng.conf_jessie.erb @@ -1,6 +1,7 @@ @version: 3.5 @include "scl.conf" @include "`scl-root`/system/tty10.conf" + # # Configuration file for syslog-ng under Debian. # Customized for sarava.org, originally developed by riseup.net @@ -11,33 +12,28 @@ # levels: emerg alert crit err warning notice info debug # -############################################################ -## global options - -options { - chain_hostnames(0); - time_reopen(10); - time_reap(360); - flush_lines(0); - log_fifo_size(2048); - create_dirs(yes); - group(adm); - perm(0640); - dir_perm(0755); - use_dns(no); +# 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$"); }; -############################################################ -## universal source - -source s_all { - internal(); - unix-stream("/dev/log"); -<% if (@log_kernel_msgs == true) -%> - file("/proc/kmsg" program_override("kernel")); -<% end -%> +######################## +# 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)); }; + ############################################################ ## generic destinations @@ -68,7 +64,7 @@ filter rrdcached { not program(rrdcached); }; filter f_auth { facility(auth, authpriv); }; destination df_auth { file("/var/log/auth.log"); }; log { - source(s_all); + source(s_src); filter(f_auth); rewrite(r_strip); destination(df_auth); @@ -80,7 +76,7 @@ log { filter f_daemon { facility(daemon); }; destination df_daemon { file("/var/log/daemon.log"); }; log { - source(s_all); + source(s_src); filter(f_daemon); filter(rrdcached); rewrite(r_strip); @@ -93,7 +89,7 @@ log { filter f_kern { facility(kern); }; destination df_kern { file("/var/log/kern.log"); }; log { - source(s_all); + source(s_src); filter(f_kern); rewrite(r_strip); destination(df_kern); @@ -105,7 +101,7 @@ log { filter f_user { facility(user); }; destination df_user { file("/var/log/user.log"); }; log { - source(s_all); + source(s_src); filter(f_user); rewrite(r_strip); destination(df_user); @@ -117,7 +113,7 @@ log { filter f_sympa { program("^(sympa|bounced|archived|task_manager)"); }; destination d_sympa { file("/var/log/sympa.log"); }; log { - source(s_all); + source(s_src); filter(f_sympa); rewrite(r_strip); destination(d_sympa); @@ -130,7 +126,7 @@ log { filter f_wwsympa { program("^wwsympa"); }; destination d_wwsympa { file("/var/log/wwsympa.log"); }; log { - source(s_all); + source(s_src); filter(f_wwsympa); rewrite(r_strip); destination(d_wwsympa); @@ -143,7 +139,7 @@ log { filter f_ldap { program("slapd"); }; destination d_ldap { file("/var/log/ldap.log"); }; log { - source(s_all); + source(s_src); filter(f_ldap); rewrite(r_strip); destination(d_ldap); @@ -158,7 +154,7 @@ log { filter f_postfix { program("^postfix/"); }; destination d_postfix { file("/var/log/postfix.log"); }; log { - source(s_all); + source(s_src); filter(f_postfix); rewrite(r_strip); destination(d_postfix); @@ -171,7 +167,7 @@ log { filter f_courier { program("courier|imap|pop"); }; destination d_courier { file("/var/log/courier.log"); }; log { - source(s_all); + source(s_src); filter(f_courier); rewrite(r_strip); destination(d_courier); @@ -184,7 +180,7 @@ log { filter f_maildrop { program("^maildrop"); }; destination d_maildrop { file("/var/log/maildrop.log"); }; log { - source(s_all); + source(s_src); filter(f_maildrop); rewrite(r_strip); destination(d_courier); @@ -198,7 +194,7 @@ filter f_mail { facility(mail); }; destination df_mail { file("/var/log/mail.log"); }; log { - source(s_all); + source(s_src); filter(f_mail); rewrite(r_strip); destination(df_mail); @@ -213,7 +209,7 @@ filter f_messages { }; destination df_messages { file("/var/log/messages.log"); }; log { - source(s_all); + source(s_src); filter(f_messages); rewrite(r_strip); destination(df_messages); @@ -228,7 +224,7 @@ filter f_errors { }; destination df_errors { file("/var/log/errors.log"); }; log { - source(s_all); + source(s_src); filter(f_errors); rewrite(r_strip); destination(df_errors); @@ -240,7 +236,7 @@ log { filter f_emerg { level(emerg); }; destination du_all { usertty("*"); }; log { - source(s_all); + source(s_src); filter(f_emerg); rewrite(r_strip); destination(du_all); @@ -257,7 +253,7 @@ filter f_xconsole { }; destination dp_xconsole { pipe("/dev/xconsole"); }; log { - source(s_all); + source(s_src); filter(f_xconsole); rewrite(r_strip); destination(dp_xconsole); -- cgit v1.2.3