1 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
3 <%- elsif has_variable?("syslogversion") and syslogversion.to_s == "3.5" -%>
12 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
13 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
17 # Configuration file for syslog-ng under Debian
19 # attempts at reproducing default syslog behavior
21 # the standard syslog levels are (in descending order of priority):
22 # emerg alert crit err warning notice info debug
23 # the aliases "error", "panic", and "warn" are deprecated
24 # the "none" priority found in the original syslogd configuration is
25 # only used in internal messages created by syslogd
32 # disable the chained hostname format in logs
33 # (default is enabled)
36 # the time to wait before a died connection is re-established
40 # the time to wait before an idle destination file is closed
44 # the number of lines buffered before written to file
45 # you might want to increase this if your disk isn't catching with
46 # all the log messages you get or if you want less disk activity
51 # the number of lines fitting in the output queue
52 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
58 # enable or disable directory creation for destination files
61 # default owner, group, and permissions for log files
62 # (defaults are 0, 0, 0600)
67 # default owner, group, and permissions for created directories
68 # (defaults are 0, 0, 0700)
73 # enable or disable DNS usage
74 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
75 # a Denial of Service attack
79 # maximum length of message in bytes
80 # this is only limited by the program listening on the /dev/log Unix
81 # socket, glibc can handle arbitrary length log messages, but -- for
82 # example -- syslogd accepts only 1024 bytes
86 #Disable statistic log messages.
89 # Some program send log messages through a private implementation.
90 # and sometimes that implementation is bad. If this happen syslog-ng
91 # may recognise the program name as hostname. Whit this option
92 # we tell the syslog-ng that if a hostname match this regexp than that
93 # is not a real hostname.
94 bad_hostname("^gconfd$");
98 # We believe our own clock more than we believe the client clock.
106 # all known message sources
108 # message generated by Syslog-NG
113 <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>
115 tcp6(port(5140) max-connections(200)
116 tls( key_file("/etc/exim4/ssl/thishost.key")
117 cert_file("/etc/exim4/ssl/thishost.crt")
118 ca_dir("/etc/exim4/ssl/")
128 # some standard log files
129 destination df_auth { file("/var/log/auth.log"); };
130 destination df_syslog { file("/var/log/syslog"); };
131 destination df_cron { file("/var/log/cron.log"); };
132 destination df_daemon { file("/var/log/daemon.log"); };
133 destination df_kern { file("/var/log/kern.log"); };
134 destination df_lpr { file("/var/log/lpr.log"); };
135 destination df_mail { file("/var/log/mail.log" group(maillog)); };
136 # destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
137 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
138 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
139 destination df_user { file("/var/log/user.log" perm(0644)); };
140 destination df_uucp { file("/var/log/uucp.log"); };
142 # these files are meant for the mail system log files
143 # and provide re-usable destinations for {mail,cron,...}.info,
144 # {mail,cron,...}.notice, etc.
145 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
146 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
147 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
148 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
149 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
151 # these files are meant for the news system, and are kept separated
152 # because they should be owned by "news" instead of "root"
153 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
154 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
155 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
157 # some more classical and useful files found in standard syslog configurations
158 destination df_debug { file("/var/log/debug"); };
159 destination df_messages { file("/var/log/messages"); };
161 <%- if kernel == 'Linux' -%>
163 # a console to view log messages under X
164 destination dp_xconsole { pipe("/dev/xconsole"); };
168 # this will send messages to everyone logged in
169 destination du_all { usertty("*"); };
175 # all messages from the auth and authpriv facilities
176 filter f_auth { facility(auth, authpriv); };
178 # all messages except from the auth and authpriv facilities
179 filter f_syslog { not facility(auth, authpriv, mail); };
181 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
182 # and uucp facilities
183 filter f_cron { facility(cron); };
184 filter f_daemon { facility(daemon); };
185 filter f_kern { facility(kern); };
186 filter f_lpr { facility(lpr); };
187 filter f_mail { facility(mail); };
188 filter f_news { facility(news); };
189 filter f_user { facility(user); };
190 filter f_uucp { facility(uucp); };
192 # some filters to select messages of priority greater or equal to info, warn,
194 # (equivalents of syslogd's *.info, *.warn, and *.err)
195 filter f_at_least_info { level(info..emerg); };
196 filter f_at_least_notice { level(notice..emerg); };
197 filter f_at_least_warn { level(warn..emerg); };
198 filter f_at_least_err { level(err..emerg); };
199 filter f_at_least_crit { level(crit..emerg); };
201 # all messages of priority debug not coming from the auth, authpriv, news, and
203 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
205 # all messages of info, notice, or warn priority not coming form the auth,
206 # authpriv, cron, daemon, mail, and news facilities
208 level(info,notice,warn)
209 and not facility(auth,authpriv,cron,daemon,mail,news);
212 # messages with priority emerg
213 filter f_emerg { level(emerg); };
215 <%- if kernel == 'Linux' -%>
216 # complex filter for messages usually sent to the xconsole
218 facility(daemon,mail)
219 or level(debug,info,notice,warn)
221 and level(crit,err,notice));
226 # order matters if you use "flags(final);" to mark the end of processing in a
229 ###############################################################################
230 ########## ON LOG CLIENTS #####################################################
231 ###############################################################################
232 ###############################################################################
233 ###############################################################################
234 # all log clients, including the log server, log their locally created
235 # messages to the standard places.
237 # auth,authpriv.* /var/log/auth.log
241 destination(df_auth);
244 # *.*;auth,authpriv.none -/var/log/syslog
248 destination(df_syslog);
251 # this is commented out in the default syslog.conf
252 # cron.* /var/log/cron.log
256 # destination(df_cron);
259 # daemon.* -/var/log/daemon.log
263 destination(df_daemon);
266 # kern.* -/var/log/kern.log
270 destination(df_kern);
273 # lpr.* -/var/log/lpr.log
280 # mail.* -/var/log/mail.log
284 destination(df_mail);
287 # user.* -/var/log/user.log
291 destination(df_user);
294 # uucp.* /var/log/uucp.log
298 destination(df_uucp);
301 # mail.info -/var/log/mail.info
305 # filter(f_at_least_info);
306 # destination(df_mail_info);
309 # mail.warn -/var/log/mail.warn
313 filter(f_at_least_warn);
314 destination(df_mail_warn);
317 # mail.err /var/log/mail.err
321 filter(f_at_least_err);
322 destination(df_mail_err);
325 # news.crit /var/log/news/news.crit
329 filter(f_at_least_crit);
330 destination(df_news_dot_crit);
333 # news.err /var/log/news/news.err
337 filter(f_at_least_err);
338 destination(df_news_dot_err);
341 # news.notice /var/log/news/news.notice
345 filter(f_at_least_notice);
346 destination(df_news_dot_notice);
351 # auth,authpriv.none;\
352 # news.none;mail.none -/var/log/debug
356 destination(df_debug);
360 # *.=info;*.=notice;*.=warn;\
361 # auth,authpriv.none;\
363 # mail,news.none -/var/log/messages
367 destination(df_messages);
378 <%- if kernel == 'Linux' -%>
380 # news.crit;news.err;news.notice;\
382 # *.=notice;*.=warn |/dev/xconsole
386 destination(dp_xconsole);
391 <%- if hostname != "lotti" -%>
392 destination loghost-lotti {
393 tcp("lotti.debian.org" port (5140)
394 tls( key_file("/etc/ssl/debian/keys/thishost.key")
395 cert_file("/etc/ssl/debian/certs/thishost.crt")
396 ca_dir("/etc/ssl/debian/certs/")
401 <%- if hostname != "lully" -%>
402 destination loghost-lully {
403 tcp("lully.debian.org" port (5140)
404 tls( key_file("/etc/ssl/debian/keys/thishost.key")
405 cert_file("/etc/ssl/debian/certs/thishost.crt")
406 ca_dir("/etc/ssl/debian/certs/")
411 <%- if hostname != "loghost-grnet-01" -%>
412 destination loghost-loghost-grnet-01 {
413 tcp("loghost-grnet-01.debian.org" port (5140)
414 tls( key_file("/etc/ssl/debian/keys/thishost.key")
415 cert_file("/etc/ssl/debian/certs/thishost.crt")
416 ca_dir("/etc/ssl/debian/certs/")
424 <%- if hostname != "lotti" -%>
425 destination(loghost-lotti);
427 <%- if hostname != "lully" -%>
428 destination(loghost-lully);
430 <%- if hostname != "loghost-grnet-01" -%>
431 destination(loghost-loghost-grnet-01);
437 <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>
438 ###############################################################################
439 ########## ON LOG HOST ########################################################
440 ###############################################################################
441 ###############################################################################
443 # The log server, additionally, also logs all local and remote messages to
444 # a few special places.
445 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
446 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
447 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
448 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
449 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
450 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
451 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
452 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
453 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
454 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
455 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
456 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
457 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
458 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
459 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
460 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
461 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
462 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
463 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
464 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
465 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
466 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
467 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
468 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
471 #----------------------------------------------------------------------
472 # Special catch all destination hostdest_sorting by host
473 #----------------------------------------------------------------------
474 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
475 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
476 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
477 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
478 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
479 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
480 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
481 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
482 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
483 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
486 #----------------------------------------------------------------------
487 # Catch all log files
488 #----------------------------------------------------------------------
489 destination df_ALL_auth { file("/var/log/auth-all.log"); };
490 destination df_ALL_mail { file("/var/log/mail-all.log"); };
491 destination df_ALL_syslog { file("/var/log/syslog-all"); };
493 log { source(s_local);
495 filter(f_auth); destination(hostdest_auth); };
496 log { source(s_local);
498 filter(f_syslog); destination(hostdest_syslog); };
499 log { source(s_local);
501 filter(f_daemon); destination(hostdest_daemon); };
502 log { source(s_local);
504 filter(f_kern); destination(hostdest_kern); };
505 log { source(s_local);
507 filter(f_lpr); destination(hostdest_lpr); };
508 log { source(s_local);
510 filter(f_mail); destination(hostdest_mail); };
511 log { source(s_local);
513 filter(f_news); destination(hostdest_mail); };
514 log { source(s_local);
516 filter(f_user); destination(hostdest_user); };
517 log { source(s_local);
519 filter(f_uucp); destination(hostdest_uucp); };
520 log { source(s_local);
522 filter(f_debug); destination(hostdest_debug); };
523 log { source(s_local);
525 filter(f_messages); destination(hostdest_messages); };
527 log { source(s_local);
529 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
530 log { source(s_local);
532 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
533 log { source(s_local);
535 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
539 log { source(s_local);
541 filter(f_auth); destination(df_ALL_auth); };
542 log { source(s_local);
544 filter(f_mail); destination(df_ALL_mail); };
545 log { source(s_local);
547 filter(f_syslog); destination(df_ALL_syslog); };