1 <%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.5" -%>
4 <%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.8" -%>
7 <%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.19" -%>
16 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
17 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
21 # Configuration file for syslog-ng under Debian
23 # attempts at reproducing default syslog behavior
25 # the standard syslog levels are (in descending order of priority):
26 # emerg alert crit err warning notice info debug
27 # the aliases "error", "panic", and "warn" are deprecated
28 # the "none" priority found in the original syslogd configuration is
29 # only used in internal messages created by syslogd
36 # disable the chained hostname format in logs
37 # (default is enabled)
40 # the time to wait before a died connection is re-established
44 # the time to wait before an idle destination file is closed
48 # the number of lines buffered before written to file
49 # you might want to increase this if your disk isn't catching with
50 # all the log messages you get or if you want less disk activity
55 # the number of lines fitting in the output queue
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
111 <%- if has_variable?("haproxy") && @haproxy -%>
112 unix-stream("/var/lib/haproxy/dev/log");
116 <%- if (@hostname == "lotti") || (@hostname == "loghost-grnet-01") || (@hostname == "loghost-osuosl-01") -%>
118 tcp6(port(5140) max-connections(400)
119 tls( key_file("/etc/exim4/ssl/thishost.key")
120 cert_file("/etc/exim4/ssl/thishost.crt")
121 ca_dir("/etc/exim4/ssl/")
126 source s_network_fastly {
127 tcp6(port(5141) max-connections(100)
128 tls( key_file("/etc/exim4/ssl/thishost.key")
129 cert_file("/etc/exim4/ssl/thishost.crt")
130 peer-verify(optional-untrusted))
139 # some standard log files
140 destination df_auth { file("/var/log/auth.log"); };
141 destination df_syslog { file("/var/log/syslog"); };
142 destination df_cron { file("/var/log/cron.log"); };
143 destination df_daemon { file("/var/log/daemon.log"); };
144 destination df_kern { file("/var/log/kern.log"); };
145 destination df_lpr { file("/var/log/lpr.log"); };
146 destination df_mail { file("/var/log/mail.log" group(maillog)); };
147 # destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
148 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
149 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
150 destination df_user { file("/var/log/user.log" perm(0644)); };
151 destination df_uucp { file("/var/log/uucp.log"); };
153 # these files are meant for the mail system log files
154 # and provide re-usable destinations for {mail,cron,...}.info,
155 # {mail,cron,...}.notice, etc.
156 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
157 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
158 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
159 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
160 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
162 # these files are meant for the news system, and are kept separated
163 # because they should be owned by "news" instead of "root"
164 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
165 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
166 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
168 # some more classical and useful files found in standard syslog configurations
169 destination df_debug { file("/var/log/debug"); };
170 destination df_messages { file("/var/log/messages"); };
172 <%- if @kernel == 'Linux' -%>
174 # a console to view log messages under X
175 destination dp_xconsole { pipe("/dev/xconsole"); };
179 # this will send messages to everyone logged in
180 destination du_all { usertty("*"); };
186 # all messages from the auth and authpriv facilities
187 filter f_auth { facility(auth, authpriv); };
189 # all messages except from the auth and authpriv facilities
190 filter f_syslog { not facility(auth, authpriv, mail); };
192 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
193 # and uucp facilities
194 filter f_cron { facility(cron); };
195 filter f_daemon { facility(daemon); };
196 filter f_kern { facility(kern); };
197 filter f_lpr { facility(lpr); };
198 filter f_mail { facility(mail); };
199 filter f_news { facility(news); };
200 filter f_user { facility(user); };
201 filter f_uucp { facility(uucp); };
203 # some filters to select messages of priority greater or equal to info, warn,
205 # (equivalents of syslogd's *.info, *.warn, and *.err)
206 filter f_at_least_info { level(info..emerg); };
207 filter f_at_least_notice { level(notice..emerg); };
208 filter f_at_least_warn { level(warn..emerg); };
209 filter f_at_least_err { level(err..emerg); };
210 filter f_at_least_crit { level(crit..emerg); };
212 # all messages of priority debug not coming from the auth, authpriv, news, and
214 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
216 # all messages of info, notice, or warn priority not coming form the auth,
217 # authpriv, cron, daemon, mail, and news facilities
219 level(info,notice,warn)
220 and not facility(auth,authpriv,cron,daemon,mail,news);
223 # messages with priority emerg
224 filter f_emerg { level(emerg); };
226 <%- if @kernel == 'Linux' -%>
227 # complex filter for messages usually sent to the xconsole
229 facility(daemon,mail)
230 or level(debug,info,notice,warn)
232 and level(crit,err,notice));
237 # order matters if you use "flags(final);" to mark the end of processing in a
240 ###############################################################################
241 ########## ON LOG CLIENTS #####################################################
242 ###############################################################################
243 ###############################################################################
244 ###############################################################################
245 # all log clients, including the log server, log their locally created
246 # messages to the standard places.
248 # auth,authpriv.* /var/log/auth.log
252 destination(df_auth);
255 # *.*;auth,authpriv.none -/var/log/syslog
259 destination(df_syslog);
262 # this is commented out in the default syslog.conf
263 # cron.* /var/log/cron.log
267 # destination(df_cron);
270 # daemon.* -/var/log/daemon.log
274 destination(df_daemon);
277 # kern.* -/var/log/kern.log
281 destination(df_kern);
284 # lpr.* -/var/log/lpr.log
291 # mail.* -/var/log/mail.log
295 destination(df_mail);
298 # user.* -/var/log/user.log
302 destination(df_user);
305 # uucp.* /var/log/uucp.log
309 destination(df_uucp);
312 # mail.info -/var/log/mail.info
316 # filter(f_at_least_info);
317 # destination(df_mail_info);
320 # mail.warn -/var/log/mail.warn
324 filter(f_at_least_warn);
325 destination(df_mail_warn);
328 # mail.err /var/log/mail.err
332 filter(f_at_least_err);
333 destination(df_mail_err);
336 # news.crit /var/log/news/news.crit
340 filter(f_at_least_crit);
341 destination(df_news_dot_crit);
344 # news.err /var/log/news/news.err
348 filter(f_at_least_err);
349 destination(df_news_dot_err);
352 # news.notice /var/log/news/news.notice
356 filter(f_at_least_notice);
357 destination(df_news_dot_notice);
362 # auth,authpriv.none;\
363 # news.none;mail.none -/var/log/debug
367 destination(df_debug);
371 # *.=info;*.=notice;*.=warn;\
372 # auth,authpriv.none;\
374 # mail,news.none -/var/log/messages
378 destination(df_messages);
389 <%- if @kernel == 'Linux' -%>
391 # news.crit;news.err;news.notice;\
393 # *.=notice;*.=warn |/dev/xconsole
397 destination(dp_xconsole);
402 <%- if @hostname != "lotti" -%>
403 destination loghost-lotti {
404 tcp("lotti.debian.org" port (5140)
405 tls( key_file("/etc/ssl/private/thishost.key")
406 cert_file("/etc/ssl/debian/certs/thishost.crt")
407 ca_dir("/etc/ssl/debian/certs/")
412 <%- if @hostname != "loghost-grnet-01" -%>
413 destination loghost-loghost-grnet-01 {
414 tcp("loghost-grnet-01.debian.org" port (5140)
415 tls( key_file("/etc/ssl/private/thishost.key")
416 cert_file("/etc/ssl/debian/certs/thishost.crt")
417 ca_dir("/etc/ssl/debian/certs/")
422 <%- if @hostname != "loghost-osuosl-01" -%>
423 destination loghost-loghost-osuosl-01 {
424 tcp("loghost-osuosl-01.debian.org" port (5140)
425 tls( key_file("/etc/ssl/private/thishost.key")
426 cert_file("/etc/ssl/debian/certs/thishost.crt")
427 ca_dir("/etc/ssl/debian/certs/")
435 <%- if @hostname != "lotti" -%>
436 destination(loghost-lotti);
438 <%- if @hostname != "loghost-grnet-01" -%>
439 destination(loghost-loghost-grnet-01);
441 <%- if @hostname != "loghost-osuosl-01" -%>
442 destination(loghost-loghost-osuosl-01);
448 <%- if (@hostname == "lotti") || (@hostname == "loghost-grnet-01") || (@hostname == "loghost-osuosl-01") -%>
449 ###############################################################################
450 ########## ON LOG HOST ########################################################
451 ###############################################################################
452 ###############################################################################
454 # The log server, additionally, also logs all local and remote messages to
455 # a few special places.
456 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
457 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
458 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
459 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
460 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
461 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
462 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
463 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
464 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
465 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
466 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
467 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
468 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
469 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
470 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
471 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
472 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
473 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
474 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
475 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
476 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
477 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
478 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
479 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
482 #----------------------------------------------------------------------
483 # Special catch all destination hostdest_sorting by host
484 #----------------------------------------------------------------------
485 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
486 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
487 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
488 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
489 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
490 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
491 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
492 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
493 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
494 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
497 #----------------------------------------------------------------------
498 # Catch all log files
499 #----------------------------------------------------------------------
500 destination df_ALL_auth { file("/var/log/auth-all.log"); };
501 destination df_ALL_mail { file("/var/log/mail-all.log"); };
502 destination df_ALL_syslog { file("/var/log/syslog-all"); };
504 log { source(s_local);
506 filter(f_auth); destination(hostdest_auth); };
507 log { source(s_local);
509 filter(f_syslog); destination(hostdest_syslog); };
510 log { source(s_local);
512 filter(f_daemon); destination(hostdest_daemon); };
513 log { source(s_local);
515 filter(f_kern); destination(hostdest_kern); };
516 log { source(s_local);
518 filter(f_lpr); destination(hostdest_lpr); };
519 log { source(s_local);
521 filter(f_mail); destination(hostdest_mail); };
522 log { source(s_local);
524 filter(f_news); destination(hostdest_mail); };
525 log { source(s_local);
527 filter(f_user); destination(hostdest_user); };
528 log { source(s_local);
530 filter(f_uucp); destination(hostdest_uucp); };
531 log { source(s_local);
533 filter(f_debug); destination(hostdest_debug); };
534 log { source(s_local);
536 filter(f_messages); destination(hostdest_messages); };
538 log { source(s_local);
540 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
541 log { source(s_local);
543 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
544 log { source(s_local);
546 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
550 log { source(s_local);
552 filter(f_auth); destination(df_ALL_auth); };
553 log { source(s_local);
555 filter(f_mail); destination(df_ALL_mail); };
556 log { source(s_local);
558 filter(f_syslog); destination(df_ALL_syslog); };
560 ## syslog endpoint for fastly services:
561 destination fastly { file("/var/log/fastly.log"); };
563 log { source(s_network_fastly);
564 destination(fastly); };