1 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
3 <%- elsif has_variable?("syslogversion") and syslogversion.to_s == "3.5" -%>
9 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
10 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
14 # Configuration file for syslog-ng under Debian
16 # attempts at reproducing default syslog behavior
18 # the standard syslog levels are (in descending order of priority):
19 # emerg alert crit err warning notice info debug
20 # the aliases "error", "panic", and "warn" are deprecated
21 # the "none" priority found in the original syslogd configuration is
22 # only used in internal messages created by syslogd
29 # disable the chained hostname format in logs
30 # (default is enabled)
33 # the time to wait before a died connection is re-established
37 # the time to wait before an idle destination file is closed
41 # the number of lines buffered before written to file
42 # you might want to increase this if your disk isn't catching with
43 # all the log messages you get or if you want less disk activity
48 # the number of lines fitting in the output queue
49 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
55 # enable or disable directory creation for destination files
58 # default owner, group, and permissions for log files
59 # (defaults are 0, 0, 0600)
64 # default owner, group, and permissions for created directories
65 # (defaults are 0, 0, 0700)
70 # enable or disable DNS usage
71 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
72 # a Denial of Service attack
76 # maximum length of message in bytes
77 # this is only limited by the program listening on the /dev/log Unix
78 # socket, glibc can handle arbitrary length log messages, but -- for
79 # example -- syslogd accepts only 1024 bytes
83 #Disable statistic log messages.
86 # Some program send log messages through a private implementation.
87 # and sometimes that implementation is bad. If this happen syslog-ng
88 # may recognise the program name as hostname. Whit this option
89 # we tell the syslog-ng that if a hostname match this regexp than that
90 # is not a real hostname.
91 bad_hostname("^gconfd$");
95 # We believe our own clock more than we believe the client clock.
103 # all known message sources
105 # message generated by Syslog-NG
107 <%- if kernel == 'Linux' -%>
108 # standard Linux log source (this is the default place for the syslog()
109 # function to send logs to)
110 unix-stream("/dev/log");
111 # messages from the kernel
112 file("/proc/kmsg" program_override("kernel: "));
114 # standard Linux log source (this is the default place for the syslog()
115 # function to send logs to)
116 unix-dgram("/var/run/log");
117 # messages from the kernel
118 file("/dev/klog" program_override("kernel: ") follow-freq(1));
122 <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>
124 tcp6(port(5140) max-connections(200)
125 tls( key_file("/etc/exim4/ssl/thishost.key")
126 cert_file("/etc/exim4/ssl/thishost.crt")
127 ca_dir("/etc/exim4/ssl/")
137 # some standard log files
138 destination df_auth { file("/var/log/auth.log"); };
139 destination df_syslog { file("/var/log/syslog"); };
140 destination df_cron { file("/var/log/cron.log"); };
141 destination df_daemon { file("/var/log/daemon.log"); };
142 destination df_kern { file("/var/log/kern.log"); };
143 destination df_lpr { file("/var/log/lpr.log"); };
144 destination df_mail { file("/var/log/mail.log" group(maillog)); };
145 # destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
146 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
147 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
148 destination df_user { file("/var/log/user.log" perm(0644)); };
149 destination df_uucp { file("/var/log/uucp.log"); };
151 # these files are meant for the mail system log files
152 # and provide re-usable destinations for {mail,cron,...}.info,
153 # {mail,cron,...}.notice, etc.
154 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
155 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
156 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
157 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
158 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
160 # these files are meant for the news system, and are kept separated
161 # because they should be owned by "news" instead of "root"
162 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
163 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
164 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
166 # some more classical and useful files found in standard syslog configurations
167 destination df_debug { file("/var/log/debug"); };
168 destination df_messages { file("/var/log/messages"); };
170 <%- if kernel == 'Linux' -%>
172 # a console to view log messages under X
173 destination dp_xconsole { pipe("/dev/xconsole"); };
177 # this will send messages to everyone logged in
178 destination du_all { usertty("*"); };
184 # all messages from the auth and authpriv facilities
185 filter f_auth { facility(auth, authpriv); };
187 # all messages except from the auth and authpriv facilities
188 filter f_syslog { not facility(auth, authpriv, mail); };
190 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
191 # and uucp facilities
192 filter f_cron { facility(cron); };
193 filter f_daemon { facility(daemon); };
194 filter f_kern { facility(kern); };
195 filter f_lpr { facility(lpr); };
196 filter f_mail { facility(mail); };
197 filter f_news { facility(news); };
198 filter f_user { facility(user); };
199 filter f_uucp { facility(uucp); };
201 # some filters to select messages of priority greater or equal to info, warn,
203 # (equivalents of syslogd's *.info, *.warn, and *.err)
204 filter f_at_least_info { level(info..emerg); };
205 filter f_at_least_notice { level(notice..emerg); };
206 filter f_at_least_warn { level(warn..emerg); };
207 filter f_at_least_err { level(err..emerg); };
208 filter f_at_least_crit { level(crit..emerg); };
210 # all messages of priority debug not coming from the auth, authpriv, news, and
212 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
214 # all messages of info, notice, or warn priority not coming form the auth,
215 # authpriv, cron, daemon, mail, and news facilities
217 level(info,notice,warn)
218 and not facility(auth,authpriv,cron,daemon,mail,news);
221 # messages with priority emerg
222 filter f_emerg { level(emerg); };
224 <%- if kernel == 'Linux' -%>
225 # complex filter for messages usually sent to the xconsole
227 facility(daemon,mail)
228 or level(debug,info,notice,warn)
230 and level(crit,err,notice));
235 # order matters if you use "flags(final);" to mark the end of processing in a
238 ###############################################################################
239 ########## ON LOG CLIENTS #####################################################
240 ###############################################################################
241 ###############################################################################
242 ###############################################################################
243 # all log clients, including the log server, log their locally created
244 # messages to the standard places.
246 # auth,authpriv.* /var/log/auth.log
250 destination(df_auth);
253 # *.*;auth,authpriv.none -/var/log/syslog
257 destination(df_syslog);
260 # this is commented out in the default syslog.conf
261 # cron.* /var/log/cron.log
265 # destination(df_cron);
268 # daemon.* -/var/log/daemon.log
272 destination(df_daemon);
275 # kern.* -/var/log/kern.log
279 destination(df_kern);
282 # lpr.* -/var/log/lpr.log
289 # mail.* -/var/log/mail.log
293 destination(df_mail);
296 # user.* -/var/log/user.log
300 destination(df_user);
303 # uucp.* /var/log/uucp.log
307 destination(df_uucp);
310 # mail.info -/var/log/mail.info
314 # filter(f_at_least_info);
315 # destination(df_mail_info);
318 # mail.warn -/var/log/mail.warn
322 filter(f_at_least_warn);
323 destination(df_mail_warn);
326 # mail.err /var/log/mail.err
330 filter(f_at_least_err);
331 destination(df_mail_err);
334 # news.crit /var/log/news/news.crit
338 filter(f_at_least_crit);
339 destination(df_news_dot_crit);
342 # news.err /var/log/news/news.err
346 filter(f_at_least_err);
347 destination(df_news_dot_err);
350 # news.notice /var/log/news/news.notice
354 filter(f_at_least_notice);
355 destination(df_news_dot_notice);
360 # auth,authpriv.none;\
361 # news.none;mail.none -/var/log/debug
365 destination(df_debug);
369 # *.=info;*.=notice;*.=warn;\
370 # auth,authpriv.none;\
372 # mail,news.none -/var/log/messages
376 destination(df_messages);
387 <%- if kernel == 'Linux' -%>
389 # news.crit;news.err;news.notice;\
391 # *.=notice;*.=warn |/dev/xconsole
395 destination(dp_xconsole);
400 <%- if hostname != "lotti" -%>
401 destination loghost-lotti {
402 tcp("lotti.debian.org" port (5140)
403 tls( key_file("/etc/ssl/debian/keys/thishost.key")
404 cert_file("/etc/ssl/debian/certs/thishost.crt")
405 ca_dir("/etc/ssl/debian/certs/")
410 <%- if hostname != "lully" -%>
411 destination loghost-lully {
412 tcp("lully.debian.org" port (5140)
413 tls( key_file("/etc/ssl/debian/keys/thishost.key")
414 cert_file("/etc/ssl/debian/certs/thishost.crt")
415 ca_dir("/etc/ssl/debian/certs/")
420 <%- if hostname != "loghost-grnet-01" -%>
421 destination loghost-loghost-grnet-01 {
422 tcp("loghost-grnet-01.debian.org" port (5140)
423 tls( key_file("/etc/ssl/debian/keys/thishost.key")
424 cert_file("/etc/ssl/debian/certs/thishost.crt")
425 ca_dir("/etc/ssl/debian/certs/")
433 <%- if hostname != "lotti" -%>
434 destination(loghost-lotti);
436 <%- if hostname != "lully" -%>
437 destination(loghost-lully);
439 <%- if hostname != "loghost-grnet-01" -%>
440 destination(loghost-loghost-grnet-01);
446 <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>
447 ###############################################################################
448 ########## ON LOG HOST ########################################################
449 ###############################################################################
450 ###############################################################################
452 # The log server, additionally, also logs all local and remote messages to
453 # a few special places.
454 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
455 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
456 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
457 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
458 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
459 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
460 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
461 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
462 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
463 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
464 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
465 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
466 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
467 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
468 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
469 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
470 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
471 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
472 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
473 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
474 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
475 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
476 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
477 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
480 #----------------------------------------------------------------------
481 # Special catch all destination hostdest_sorting by host
482 #----------------------------------------------------------------------
483 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
484 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
485 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
486 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
487 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
488 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
489 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
490 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
491 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
492 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
495 #----------------------------------------------------------------------
496 # Catch all log files
497 #----------------------------------------------------------------------
498 destination df_ALL_auth { file("/var/log/auth-all.log"); };
499 destination df_ALL_mail { file("/var/log/mail-all.log"); };
500 destination df_ALL_syslog { file("/var/log/syslog-all"); };
502 log { source(s_local);
504 filter(f_auth); destination(hostdest_auth); };
505 log { source(s_local);
507 filter(f_syslog); destination(hostdest_syslog); };
508 log { source(s_local);
510 filter(f_daemon); destination(hostdest_daemon); };
511 log { source(s_local);
513 filter(f_kern); destination(hostdest_kern); };
514 log { source(s_local);
516 filter(f_lpr); destination(hostdest_lpr); };
517 log { source(s_local);
519 filter(f_mail); destination(hostdest_mail); };
520 log { source(s_local);
522 filter(f_news); destination(hostdest_mail); };
523 log { source(s_local);
525 filter(f_user); destination(hostdest_user); };
526 log { source(s_local);
528 filter(f_uucp); destination(hostdest_uucp); };
529 log { source(s_local);
531 filter(f_debug); destination(hostdest_debug); };
532 log { source(s_local);
534 filter(f_messages); destination(hostdest_messages); };
536 log { source(s_local);
538 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
539 log { source(s_local);
541 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
542 log { source(s_local);
544 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
548 log { source(s_local);
550 filter(f_auth); destination(df_ALL_auth); };
551 log { source(s_local);
553 filter(f_mail); destination(df_ALL_mail); };
554 log { source(s_local);
556 filter(f_syslog); destination(df_ALL_syslog); };