From 9ceb4800959514ab3e01dc9e2791a5f632505201 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 24 Mar 2016 14:50:58 -0300 Subject: Make config a bit closer to defaults for wheezy --- templates/syslog-ng.conf_wheezy.erb | 80 +++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/templates/syslog-ng.conf_wheezy.erb b/templates/syslog-ng.conf_wheezy.erb index 88f5551..725b495 100644 --- a/templates/syslog-ng.conf_wheezy.erb +++ b/templates/syslog-ng.conf_wheezy.erb @@ -1,4 +1,7 @@ @version: 3.3 +@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 @@ -9,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 @@ -66,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); @@ -78,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); @@ -91,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); @@ -103,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); @@ -115,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); @@ -128,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); @@ -141,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); @@ -152,11 +150,11 @@ log { ## postfix.log # special source because of chroot jail -#source s_postfix { unix-stream("/var/spool/postfix/dev/log" keep-alive(yes)); }; +#source s_postfix { unix-stream("/var/spool/postfix/dev/log" keep-alive(yes)); }; 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); @@ -169,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); @@ -182,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); @@ -196,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); @@ -211,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); @@ -226,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); @@ -238,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); @@ -255,9 +253,13 @@ 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); }; +### +# Include all config files in /etc/syslog-ng/conf.d/ +### +@include "/etc/syslog-ng/conf.d/*.conf" -- cgit v1.2.3