1 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
7 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
8 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
12 # Configuration file for syslog-ng under Debian
14 # attempts at reproducing default syslog behavior
16 # the standard syslog levels are (in descending order of priority):
17 # emerg alert crit err warning notice info debug
18 # the aliases "error", "panic", and "warn" are deprecated
19 # the "none" priority found in the original syslogd configuration is
20 # only used in internal messages created by syslogd
27 # disable the chained hostname format in logs
28 # (default is enabled)
31 # the time to wait before a died connection is re-established
35 # the time to wait before an idle destination file is closed
39 # the number of lines buffered before written to file
40 # you might want to increase this if your disk isn't catching with
41 # all the log messages you get or if you want less disk activity
46 # the number of lines fitting in the output queue
47 <%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
53 # enable or disable directory creation for destination files
56 # default owner, group, and permissions for log files
57 # (defaults are 0, 0, 0600)
62 # default owner, group, and permissions for created directories
63 # (defaults are 0, 0, 0700)
68 # enable or disable DNS usage
69 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
70 # a Denial of Service attack
74 # maximum length of message in bytes
75 # this is only limited by the program listening on the /dev/log Unix
76 # socket, glibc can handle arbitrary length log messages, but -- for
77 # example -- syslogd accepts only 1024 bytes
81 #Disable statistic log messages.
84 # Some program send log messages through a private implementation.
85 # and sometimes that implementation is bad. If this happen syslog-ng
86 # may recognise the program name as hostname. Whit this option
87 # we tell the syslog-ng that if a hostname match this regexp than that
88 # is not a real hostname.
89 bad_hostname("^gconfd$");
93 # We believe our own clock more than we believe the client clock.
101 # all known message sources
103 # message generated by Syslog-NG
105 <%- if kernel == 'Linux' -%>
106 # standard Linux log source (this is the default place for the syslog()
107 # function to send logs to)
108 unix-stream("/dev/log");
109 # messages from the kernel
110 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 file("/dev/klog" program_override("kernel: ") follow-freq(1));
120 <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>
122 tcp6(port(5140) max-connections(200)
123 tls( key_file("/etc/exim4/ssl/thishost.key")
124 cert_file("/etc/exim4/ssl/thishost.crt")
125 ca_dir("/etc/exim4/ssl/")
135 # some standard log files
136 destination df_auth { file("/var/log/auth.log"); };
137 destination df_syslog { file("/var/log/syslog"); };
138 destination df_cron { file("/var/log/cron.log"); };
139 destination df_daemon { file("/var/log/daemon.log"); };
140 destination df_kern { file("/var/log/kern.log"); };
141 destination df_lpr { file("/var/log/lpr.log"); };
142 destination df_mail { file("/var/log/mail.log" group(maillog)); };
143 # destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
144 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
145 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
146 destination df_user { file("/var/log/user.log" perm(0644)); };
147 destination df_uucp { file("/var/log/uucp.log"); };
149 # these files are meant for the mail system log files
150 # and provide re-usable destinations for {mail,cron,...}.info,
151 # {mail,cron,...}.notice, etc.
152 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
153 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
154 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
155 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
156 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
158 # these files are meant for the news system, and are kept separated
159 # because they should be owned by "news" instead of "root"
160 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
161 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
162 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
164 # some more classical and useful files found in standard syslog configurations
165 destination df_debug { file("/var/log/debug"); };
166 destination df_messages { file("/var/log/messages"); };
168 <%- if kernel == 'Linux' -%>
170 # a console to view log messages under X
171 destination dp_xconsole { pipe("/dev/xconsole"); };
175 # this will send messages to everyone logged in
176 destination du_all { usertty("*"); };
182 # all messages from the auth and authpriv facilities
183 filter f_auth { facility(auth, authpriv); };
185 # all messages except from the auth and authpriv facilities
186 filter f_syslog { not facility(auth, authpriv, mail); };
188 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
189 # and uucp facilities
190 filter f_cron { facility(cron); };
191 filter f_daemon { facility(daemon); };
192 filter f_kern { facility(kern); };
193 filter f_lpr { facility(lpr); };
194 filter f_mail { facility(mail); };
195 filter f_news { facility(news); };
196 filter f_user { facility(user); };
197 filter f_uucp { facility(uucp); };
199 # some filters to select messages of priority greater or equal to info, warn,
201 # (equivalents of syslogd's *.info, *.warn, and *.err)
202 filter f_at_least_info { level(info..emerg); };
203 filter f_at_least_notice { level(notice..emerg); };
204 filter f_at_least_warn { level(warn..emerg); };
205 filter f_at_least_err { level(err..emerg); };
206 filter f_at_least_crit { level(crit..emerg); };
208 # all messages of priority debug not coming from the auth, authpriv, news, and
210 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
212 # all messages of info, notice, or warn priority not coming form the auth,
213 # authpriv, cron, daemon, mail, and news facilities
215 level(info,notice,warn)
216 and not facility(auth,authpriv,cron,daemon,mail,news);
219 # messages with priority emerg
220 filter f_emerg { level(emerg); };
222 <%- if kernel == 'Linux' -%>
223 # complex filter for messages usually sent to the xconsole
225 facility(daemon,mail)
226 or level(debug,info,notice,warn)
228 and level(crit,err,notice));
233 # order matters if you use "flags(final);" to mark the end of processing in a
236 ###############################################################################
237 ########## ON LOG CLIENTS #####################################################
238 ###############################################################################
239 ###############################################################################
240 ###############################################################################
241 # all log clients, including the log server, log their locally created
242 # messages to the standard places.
244 # auth,authpriv.* /var/log/auth.log
248 destination(df_auth);
251 # *.*;auth,authpriv.none -/var/log/syslog
255 destination(df_syslog);
258 # this is commented out in the default syslog.conf
259 # cron.* /var/log/cron.log
263 # destination(df_cron);
266 # daemon.* -/var/log/daemon.log
270 destination(df_daemon);
273 # kern.* -/var/log/kern.log
277 destination(df_kern);
280 # lpr.* -/var/log/lpr.log
287 # mail.* -/var/log/mail.log
291 destination(df_mail);
294 # user.* -/var/log/user.log
298 destination(df_user);
301 # uucp.* /var/log/uucp.log
305 destination(df_uucp);
308 # mail.info -/var/log/mail.info
312 # filter(f_at_least_info);
313 # destination(df_mail_info);
316 # mail.warn -/var/log/mail.warn
320 filter(f_at_least_warn);
321 destination(df_mail_warn);
324 # mail.err /var/log/mail.err
328 filter(f_at_least_err);
329 destination(df_mail_err);
332 # news.crit /var/log/news/news.crit
336 filter(f_at_least_crit);
337 destination(df_news_dot_crit);
340 # news.err /var/log/news/news.err
344 filter(f_at_least_err);
345 destination(df_news_dot_err);
348 # news.notice /var/log/news/news.notice
352 filter(f_at_least_notice);
353 destination(df_news_dot_notice);
358 # auth,authpriv.none;\
359 # news.none;mail.none -/var/log/debug
363 destination(df_debug);
367 # *.=info;*.=notice;*.=warn;\
368 # auth,authpriv.none;\
370 # mail,news.none -/var/log/messages
374 destination(df_messages);
385 <%- if kernel == 'Linux' -%>
387 # news.crit;news.err;news.notice;\
389 # *.=notice;*.=warn |/dev/xconsole
393 destination(dp_xconsole);
398 <%- if hostname != "lotti" -%>
399 destination loghost-lotti {
400 tcp("lotti.debian.org" port (5140)
401 tls( key_file("/etc/ssl/debian/keys/thishost.key")
402 cert_file("/etc/ssl/debian/certs/thishost.crt")
403 ca_dir("/etc/ssl/debian/certs/")
408 <%- if hostname != "lully" -%>
409 destination loghost-lully {
410 tcp("lully.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 != "loghost-grnet-01" -%>
419 destination loghost-loghost-grnet-01 {
420 tcp("loghost-grnet-01.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 != "lotti" -%>
432 destination(loghost-lotti);
434 <%- if hostname != "lully" -%>
435 destination(loghost-lully);
437 <%- if hostname != "loghost01-grnet-01" -%>
438 destination(loghost-loghost-grnet-01);
444 <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>
445 ###############################################################################
446 ########## ON LOG HOST ########################################################
447 ###############################################################################
448 ###############################################################################
450 # The log server, additionally, also logs all local and remote messages to
451 # a few special places.
452 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
453 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
454 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
455 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
456 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
457 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
458 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
459 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
460 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
461 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
462 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
463 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
464 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
465 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
466 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
467 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
468 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
469 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
470 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
471 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
472 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
473 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
474 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
475 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
478 #----------------------------------------------------------------------
479 # Special catch all destination hostdest_sorting by host
480 #----------------------------------------------------------------------
481 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
482 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
483 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
484 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
485 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
486 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
487 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
488 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
489 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
490 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
493 #----------------------------------------------------------------------
494 # Catch all log files
495 #----------------------------------------------------------------------
496 destination df_ALL_auth { file("/var/log/auth-all.log"); };
497 destination df_ALL_mail { file("/var/log/mail-all.log"); };
498 destination df_ALL_syslog { file("/var/log/syslog-all"); };
500 log { source(s_local);
502 filter(f_auth); destination(hostdest_auth); };
503 log { source(s_local);
505 filter(f_syslog); destination(hostdest_syslog); };
506 log { source(s_local);
508 filter(f_daemon); destination(hostdest_daemon); };
509 log { source(s_local);
511 filter(f_kern); destination(hostdest_kern); };
512 log { source(s_local);
514 filter(f_lpr); destination(hostdest_lpr); };
515 log { source(s_local);
517 filter(f_mail); destination(hostdest_mail); };
518 log { source(s_local);
520 filter(f_news); destination(hostdest_mail); };
521 log { source(s_local);
523 filter(f_user); destination(hostdest_user); };
524 log { source(s_local);
526 filter(f_uucp); destination(hostdest_uucp); };
527 log { source(s_local);
529 filter(f_debug); destination(hostdest_debug); };
530 log { source(s_local);
532 filter(f_messages); destination(hostdest_messages); };
534 log { source(s_local);
536 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
537 log { source(s_local);
539 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
540 log { source(s_local);
542 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
546 log { source(s_local);
548 filter(f_auth); destination(df_ALL_auth); };
549 log { source(s_local);
551 filter(f_mail); destination(df_ALL_mail); };
552 log { source(s_local);
554 filter(f_syslog); destination(df_ALL_syslog); };