1 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
5 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
6 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
10 # Configuration file for syslog-ng under Debian
12 # attempts at reproducing default syslog behavior
14 # the standard syslog levels are (in descending order of priority):
15 # emerg alert crit err warning notice info debug
16 # the aliases "error", "panic", and "warn" are deprecated
17 # the "none" priority found in the original syslogd configuration is
18 # only used in internal messages created by syslogd
25 # disable the chained hostname format in logs
26 # (default is enabled)
29 # the time to wait before a died connection is re-established
33 # the time to wait before an idle destination file is closed
37 # the number of lines buffered before written to file
38 # you might want to increase this if your disk isn't catching with
39 # all the log messages you get or if you want less disk activity
44 # the number of lines fitting in the output queue
47 # enable or disable directory creation for destination files
50 # default owner, group, and permissions for log files
51 # (defaults are 0, 0, 0600)
56 # default owner, group, and permissions for created directories
57 # (defaults are 0, 0, 0700)
62 # enable or disable DNS usage
63 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
64 # a Denial of Service attack
68 # maximum length of message in bytes
69 # this is only limited by the program listening on the /dev/log Unix
70 # socket, glibc can handle arbitrary length log messages, but -- for
71 # example -- syslogd accepts only 1024 bytes
75 #Disable statistic log messages.
78 # Some program send log messages through a private implementation.
79 # and sometimes that implementation is bad. If this happen syslog-ng
80 # may recognise the program name as hostname. Whit this option
81 # we tell the syslog-ng that if a hostname match this regexp than that
82 # is not a real hostname.
83 bad_hostname("^gconfd$");
85 <%- if (hostname == "heininen") || (hostname == "lotti") -%>
86 # we trust our mutual authenticated syslog clients
96 # all known message sources
98 # message generated by Syslog-NG
100 <%- if kernel == 'Linux' -%>
101 # standard Linux log source (this is the default place for the syslog()
102 # function to send logs to)
103 unix-stream("/dev/log");
104 # messages from the kernel
105 <%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
106 file("/proc/kmsg" log_prefix("kernel: "));
108 file("/proc/kmsg" program_override("kernel: "));
111 # standard Linux log source (this is the default place for the syslog()
112 # function to send logs to)
113 unix-dgram("/var/run/log");
114 # messages from the kernel
115 <%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
116 file("/dev/klog" log_prefix("kernel: "));
118 file("/dev/klog" program_override("kernel: "));
121 <%- if hostname == "paganini" -%>
122 # use the following line if you want to receive remote UDP logging messages
123 # (this is equivalent to the "-r" syslogd flag)
128 <%- if (hostname == "heininen") || (hostname == "lotti") -%>
130 tcp6(port(5140) max-connections(200)
131 tls( key_file("/etc/exim4/ssl/thishost.key")
132 cert_file("/etc/exim4/ssl/thishost.crt")
133 ca_dir("/etc/exim4/ssl/")
143 # some standard log files
144 destination df_auth { file("/var/log/auth.log"); };
145 destination df_syslog { file("/var/log/syslog"); };
146 destination df_cron { file("/var/log/cron.log"); };
147 destination df_daemon { file("/var/log/daemon.log"); };
148 destination df_kern { file("/var/log/kern.log"); };
149 destination df_lpr { file("/var/log/lpr.log"); };
150 destination df_mail { file("/var/log/mail.log" group(maillog)); };
151 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
152 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
153 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
154 destination df_user { file("/var/log/user.log" perm(0644)); };
155 destination df_uucp { file("/var/log/uucp.log"); };
157 # these files are meant for the mail system log files
158 # and provide re-usable destinations for {mail,cron,...}.info,
159 # {mail,cron,...}.notice, etc.
160 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
161 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
162 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
163 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
164 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
166 # these files are meant for the news system, and are kept separated
167 # because they should be owned by "news" instead of "root"
168 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
169 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
170 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
172 # some more classical and useful files found in standard syslog configurations
173 destination df_debug { file("/var/log/debug"); };
174 destination df_messages { file("/var/log/messages"); };
176 <%- if kernel == 'Linux' -%>
178 # a console to view log messages under X
179 destination dp_xconsole { pipe("/dev/xconsole"); };
183 # this will send messages to everyone logged in
184 destination du_all { usertty("*"); };
190 # all messages from the auth and authpriv facilities
191 filter f_auth { facility(auth, authpriv); };
193 # all messages except from the auth and authpriv facilities
194 filter f_syslog { not facility(auth, authpriv, mail); };
196 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
197 # and uucp facilities
198 filter f_cron { facility(cron); };
199 filter f_daemon { facility(daemon); };
200 filter f_kern { facility(kern); };
201 filter f_lpr { facility(lpr); };
202 filter f_mail { facility(mail); };
203 filter f_news { facility(news); };
204 filter f_user { facility(user); };
205 filter f_uucp { facility(uucp); };
207 # some filters to select messages of priority greater or equal to info, warn,
209 # (equivalents of syslogd's *.info, *.warn, and *.err)
210 filter f_at_least_info { level(info..emerg); };
211 filter f_at_least_notice { level(notice..emerg); };
212 filter f_at_least_warn { level(warn..emerg); };
213 filter f_at_least_err { level(err..emerg); };
214 filter f_at_least_crit { level(crit..emerg); };
216 # all messages of priority debug not coming from the auth, authpriv, news, and
218 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
220 # all messages of info, notice, or warn priority not coming form the auth,
221 # authpriv, cron, daemon, mail, and news facilities
223 level(info,notice,warn)
224 and not facility(auth,authpriv,cron,daemon,mail,news);
227 # messages with priority emerg
228 filter f_emerg { level(emerg); };
230 <%- if kernel == 'Linux' -%>
231 # complex filter for messages usually sent to the xconsole
233 facility(daemon,mail)
234 or level(debug,info,notice,warn)
236 and level(crit,err,notice));
241 # order matters if you use "flags(final);" to mark the end of processing in a
244 ###############################################################################
245 ########## ON LOG CLIENTS #####################################################
246 ###############################################################################
247 ###############################################################################
248 ###############################################################################
249 # all log clients, including the log server, log their locally created
250 # messages to the standard places.
252 # auth,authpriv.* /var/log/auth.log
256 destination(df_auth);
259 # *.*;auth,authpriv.none -/var/log/syslog
263 destination(df_syslog);
266 # this is commented out in the default syslog.conf
267 # cron.* /var/log/cron.log
271 # destination(df_cron);
274 # daemon.* -/var/log/daemon.log
278 destination(df_daemon);
281 # kern.* -/var/log/kern.log
285 destination(df_kern);
288 # lpr.* -/var/log/lpr.log
295 # mail.* -/var/log/mail.log
299 destination(df_mail);
302 # user.* -/var/log/user.log
306 destination(df_user);
309 # uucp.* /var/log/uucp.log
313 destination(df_uucp);
316 # mail.info -/var/log/mail.info
320 filter(f_at_least_info);
321 destination(df_mail_info);
324 # mail.warn -/var/log/mail.warn
328 filter(f_at_least_warn);
329 destination(df_mail_warn);
332 # mail.err /var/log/mail.err
336 filter(f_at_least_err);
337 destination(df_mail_err);
340 # news.crit /var/log/news/news.crit
344 filter(f_at_least_crit);
345 destination(df_news_dot_crit);
348 # news.err /var/log/news/news.err
352 filter(f_at_least_err);
353 destination(df_news_dot_err);
356 # news.notice /var/log/news/news.notice
360 filter(f_at_least_notice);
361 destination(df_news_dot_notice);
366 # auth,authpriv.none;\
367 # news.none;mail.none -/var/log/debug
371 destination(df_debug);
375 # *.=info;*.=notice;*.=warn;\
376 # auth,authpriv.none;\
378 # mail,news.none -/var/log/messages
382 destination(df_messages);
393 <%- if kernel == 'Linux' -%>
395 # news.crit;news.err;news.notice;\
397 # *.=notice;*.=warn |/dev/xconsole
401 destination(dp_xconsole);
406 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
407 <%- if hostname != "heininen" -%>
408 destination loghost-heininen {
409 tcp("heininen.debian.org" port (5140)
410 tls( key_file("/etc/ssl/debian/keys/thishost.key")
411 cert_file("/etc/ssl/debian/certs/thishost.crt")
412 ca_dir("/etc/ssl/debian/certs/")
417 <%- if hostname != "lotti" -%>
418 destination loghost-lotti {
419 tcp("lotti.debian.org" port (5140)
420 tls( key_file("/etc/ssl/debian/keys/thishost.key")
421 cert_file("/etc/ssl/debian/certs/thishost.crt")
422 ca_dir("/etc/ssl/debian/certs/")
430 <%- if hostname != "heininen" -%>
431 destination(loghost-heininen);
433 <%- if hostname != "lotti" -%>
434 destination(loghost-lotti);
441 <%- if (hostname == "heininen") || (hostname == "lotti") -%>
442 ###############################################################################
443 ########## ON LOG HOST ########################################################
444 ###############################################################################
445 ###############################################################################
447 # The log server, additionally, also logs all local and remote messages to
448 # a few special places.
449 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
450 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
451 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
452 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
453 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
454 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
455 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
456 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
457 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
458 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
459 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
460 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
461 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
462 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
463 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
464 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
465 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
466 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
467 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
468 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
469 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
470 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
471 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
472 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
475 #----------------------------------------------------------------------
476 # Special catch all destination hostdest_sorting by host
477 #----------------------------------------------------------------------
478 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
479 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
480 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
481 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
482 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
483 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
484 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
485 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
486 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
487 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
490 #----------------------------------------------------------------------
491 # Catch all log files
492 #----------------------------------------------------------------------
493 destination df_ALL_auth { file("/var/log/auth-all.log"); };
494 destination df_ALL_mail { file("/var/log/mail-all.log"); };
495 destination df_ALL_syslog { file("/var/log/syslog-all"); };
497 log { source(s_local);
499 filter(f_auth); destination(hostdest_auth); };
500 log { source(s_local);
502 filter(f_syslog); destination(hostdest_syslog); };
503 log { source(s_local);
505 filter(f_daemon); destination(hostdest_daemon); };
506 log { source(s_local);
508 filter(f_kern); destination(hostdest_kern); };
509 log { source(s_local);
511 filter(f_lpr); destination(hostdest_lpr); };
512 log { source(s_local);
514 filter(f_mail); destination(hostdest_mail); };
515 log { source(s_local);
517 filter(f_news); destination(hostdest_mail); };
518 log { source(s_local);
520 filter(f_user); destination(hostdest_user); };
521 log { source(s_local);
523 filter(f_uucp); destination(hostdest_uucp); };
524 log { source(s_local);
526 filter(f_debug); destination(hostdest_debug); };
527 log { source(s_local);
529 filter(f_messages); destination(hostdest_messages); };
531 log { source(s_local);
533 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
534 log { source(s_local);
536 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
537 log { source(s_local);
539 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
543 log { source(s_local);
545 filter(f_auth); destination(df_ALL_auth); };
546 log { source(s_local);
548 filter(f_mail); destination(df_ALL_mail); };
549 log { source(s_local);
551 filter(f_syslog); destination(df_ALL_syslog); };