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
26 # disable the chained hostname format in logs
27 # (default is enabled)
30 # the time to wait before a died connection is re-established
34 # the time to wait before an idle destination file is closed
38 # the number of lines buffered before written to file
39 # you might want to increase this if your disk isn't catching with
40 # all the log messages you get or if you want less disk activity
45 # the number of lines fitting in the output queue
48 # enable or disable directory creation for destination files
51 # default owner, group, and permissions for log files
52 # (defaults are 0, 0, 0600)
57 # default owner, group, and permissions for created directories
58 # (defaults are 0, 0, 0700)
63 # enable or disable DNS usage
64 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
65 # a Denial of Service attack
69 # maximum length of message in bytes
70 # this is only limited by the program listening on the /dev/log Unix
71 # socket, glibc can handle arbitrary length log messages, but -- for
72 # example -- syslogd accepts only 1024 bytes
76 #Disable statistic log messages.
79 # Some program send log messages through a private implementation.
80 # and sometimes that implementation is bad. If this happen syslog-ng
81 # may recognise the program name as hostname. Whit this option
82 # we tell the syslog-ng that if a hostname match this regexp than that
83 # is not a real hostname.
84 bad_hostname("^gconfd$");
86 <%- if (hostname == "heininen") || (hostname == "lotti") -%>
87 # we trust our mutual authenticated syslog clients
97 # all known message sources
99 # message generated by Syslog-NG
101 <%- if kernel == 'Linux' -%>
102 # standard Linux log source (this is the default place for the syslog()
103 # function to send logs to)
104 unix-stream("/dev/log");
105 # messages from the kernel
106 <%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
107 file("/proc/kmsg" log_prefix("kernel: "));
109 file("/proc/kmsg" program_override("kernel: "));
112 # standard Linux log source (this is the default place for the syslog()
113 # function to send logs to)
114 unix-dgram("/var/run/log");
115 # messages from the kernel
116 <%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
117 file("/dev/klog" log_prefix("kernel: "));
119 file("/dev/klog" program_override("kernel: "));
122 <%- if hostname == "paganini" -%>
123 # use the following line if you want to receive remote UDP logging messages
124 # (this is equivalent to the "-r" syslogd flag)
129 <%- if (hostname == "heininen") || (hostname == "lotti") -%>
131 tcp6(port(5140) max-connections(200)
132 tls( key_file("/etc/exim4/ssl/thishost.key")
133 cert_file("/etc/exim4/ssl/thishost.crt")
134 ca_dir("/etc/exim4/ssl/")
144 # some standard log files
145 destination df_auth { file("/var/log/auth.log"); };
146 destination df_syslog { file("/var/log/syslog"); };
147 destination df_cron { file("/var/log/cron.log"); };
148 destination df_daemon { file("/var/log/daemon.log"); };
149 destination df_kern { file("/var/log/kern.log"); };
150 destination df_lpr { file("/var/log/lpr.log"); };
151 destination df_mail { file("/var/log/mail.log" group(maillog)); };
152 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
153 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
154 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
155 destination df_user { file("/var/log/user.log" perm(0644)); };
156 destination df_uucp { file("/var/log/uucp.log"); };
158 # these files are meant for the mail system log files
159 # and provide re-usable destinations for {mail,cron,...}.info,
160 # {mail,cron,...}.notice, etc.
161 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
162 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
163 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
164 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
165 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
167 # these files are meant for the news system, and are kept separated
168 # because they should be owned by "news" instead of "root"
169 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
170 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
171 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
173 # some more classical and useful files found in standard syslog configurations
174 destination df_debug { file("/var/log/debug"); };
175 destination df_messages { file("/var/log/messages"); };
177 <%- if kernel == 'Linux' -%>
179 # a console to view log messages under X
180 destination dp_xconsole { pipe("/dev/xconsole"); };
184 # this will send messages to everyone logged in
185 destination du_all { usertty("*"); };
191 # all messages from the auth and authpriv facilities
192 filter f_auth { facility(auth, authpriv); };
194 # all messages except from the auth and authpriv facilities
195 filter f_syslog { not facility(auth, authpriv, mail); };
197 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
198 # and uucp facilities
199 filter f_cron { facility(cron); };
200 filter f_daemon { facility(daemon); };
201 filter f_kern { facility(kern); };
202 filter f_lpr { facility(lpr); };
203 filter f_mail { facility(mail); };
204 filter f_news { facility(news); };
205 filter f_user { facility(user); };
206 filter f_uucp { facility(uucp); };
208 # some filters to select messages of priority greater or equal to info, warn,
210 # (equivalents of syslogd's *.info, *.warn, and *.err)
211 filter f_at_least_info { level(info..emerg); };
212 filter f_at_least_notice { level(notice..emerg); };
213 filter f_at_least_warn { level(warn..emerg); };
214 filter f_at_least_err { level(err..emerg); };
215 filter f_at_least_crit { level(crit..emerg); };
217 # all messages of priority debug not coming from the auth, authpriv, news, and
219 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
221 # all messages of info, notice, or warn priority not coming form the auth,
222 # authpriv, cron, daemon, mail, and news facilities
224 level(info,notice,warn)
225 and not facility(auth,authpriv,cron,daemon,mail,news);
228 # messages with priority emerg
229 filter f_emerg { level(emerg); };
231 <%- if kernel == 'Linux' -%>
232 # complex filter for messages usually sent to the xconsole
234 facility(daemon,mail)
235 or level(debug,info,notice,warn)
237 and level(crit,err,notice));
242 # order matters if you use "flags(final);" to mark the end of processing in a
245 ###############################################################################
246 ########## ON LOG CLIENTS #####################################################
247 ###############################################################################
248 ###############################################################################
249 ###############################################################################
250 # all log clients, including the log server, log their locally created
251 # messages to the standard places.
253 # auth,authpriv.* /var/log/auth.log
257 destination(df_auth);
260 # *.*;auth,authpriv.none -/var/log/syslog
264 destination(df_syslog);
267 # this is commented out in the default syslog.conf
268 # cron.* /var/log/cron.log
272 # destination(df_cron);
275 # daemon.* -/var/log/daemon.log
279 destination(df_daemon);
282 # kern.* -/var/log/kern.log
286 destination(df_kern);
289 # lpr.* -/var/log/lpr.log
296 # mail.* -/var/log/mail.log
300 destination(df_mail);
303 # user.* -/var/log/user.log
307 destination(df_user);
310 # uucp.* /var/log/uucp.log
314 destination(df_uucp);
317 # mail.info -/var/log/mail.info
321 filter(f_at_least_info);
322 destination(df_mail_info);
325 # mail.warn -/var/log/mail.warn
329 filter(f_at_least_warn);
330 destination(df_mail_warn);
333 # mail.err /var/log/mail.err
337 filter(f_at_least_err);
338 destination(df_mail_err);
341 # news.crit /var/log/news/news.crit
345 filter(f_at_least_crit);
346 destination(df_news_dot_crit);
349 # news.err /var/log/news/news.err
353 filter(f_at_least_err);
354 destination(df_news_dot_err);
357 # news.notice /var/log/news/news.notice
361 filter(f_at_least_notice);
362 destination(df_news_dot_notice);
367 # auth,authpriv.none;\
368 # news.none;mail.none -/var/log/debug
372 destination(df_debug);
376 # *.=info;*.=notice;*.=warn;\
377 # auth,authpriv.none;\
379 # mail,news.none -/var/log/messages
383 destination(df_messages);
394 <%- if kernel == 'Linux' -%>
396 # news.crit;news.err;news.notice;\
398 # *.=notice;*.=warn |/dev/xconsole
402 destination(dp_xconsole);
407 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
408 <%- if hostname != "heininen" -%>
409 destination loghost-heininen {
410 tcp("heininen.debian.org" port (5140)
411 tls( key_file("/etc/ssl/debian/keys/thishost.key")
412 cert_file("/etc/ssl/debian/certs/thishost.crt")
413 ca_dir("/etc/ssl/debian/certs/")
418 <%- if hostname != "lotti" -%>
419 destination loghost-lotti {
420 tcp("lotti.debian.org" port (5140)
421 tls( key_file("/etc/ssl/debian/keys/thishost.key")
422 cert_file("/etc/ssl/debian/certs/thishost.crt")
423 ca_dir("/etc/ssl/debian/certs/")
431 <%- if hostname != "heininen" -%>
432 destination(loghost-heininen);
434 <%- if hostname != "lotti" -%>
435 destination(loghost-lotti);
442 <%- if (hostname == "heininen") || (hostname == "lotti") -%>
443 ###############################################################################
444 ########## ON LOG HOST ########################################################
445 ###############################################################################
446 ###############################################################################
448 # The log server, additionally, also logs all local and remote messages to
449 # a few special places.
450 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
451 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
452 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
453 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
454 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
455 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
456 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
457 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
458 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
459 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
460 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
461 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
462 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
463 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
464 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
465 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
466 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
467 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
468 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
469 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
470 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
471 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
472 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
473 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
476 #----------------------------------------------------------------------
477 # Special catch all destination hostdest_sorting by host
478 #----------------------------------------------------------------------
479 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
480 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
481 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
482 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
483 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
484 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
485 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
486 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
487 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
488 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
491 #----------------------------------------------------------------------
492 # Catch all log files
493 #----------------------------------------------------------------------
494 destination df_ALL_auth { file("/var/log/auth-all.log"); };
495 destination df_ALL_mail { file("/var/log/mail-all.log"); };
496 destination df_ALL_syslog { file("/var/log/syslog-all"); };
498 log { source(s_local);
500 filter(f_auth); destination(hostdest_auth); };
501 log { source(s_local);
503 filter(f_syslog); destination(hostdest_syslog); };
504 log { source(s_local);
506 filter(f_daemon); destination(hostdest_daemon); };
507 log { source(s_local);
509 filter(f_kern); destination(hostdest_kern); };
510 log { source(s_local);
512 filter(f_lpr); destination(hostdest_lpr); };
513 log { source(s_local);
515 filter(f_mail); destination(hostdest_mail); };
516 log { source(s_local);
518 filter(f_news); destination(hostdest_mail); };
519 log { source(s_local);
521 filter(f_user); destination(hostdest_user); };
522 log { source(s_local);
524 filter(f_uucp); destination(hostdest_uucp); };
525 log { source(s_local);
527 filter(f_debug); destination(hostdest_debug); };
528 log { source(s_local);
530 filter(f_messages); destination(hostdest_messages); };
532 log { source(s_local);
534 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
535 log { source(s_local);
537 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
538 log { source(s_local);
540 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
544 log { source(s_local);
546 filter(f_auth); destination(df_ALL_auth); };
547 log { source(s_local);
549 filter(f_mail); destination(df_ALL_mail); };
550 log { source(s_local);
552 filter(f_syslog); destination(df_ALL_syslog); };