1 <%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.1" -%>
3 <%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.5" -%>
6 <%- elsif has_variable?("syslogversion") and @syslogversion.to_s == "3.8" -%>
15 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
16 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
20 # Configuration file for syslog-ng under Debian
22 # attempts at reproducing default syslog behavior
24 # the standard syslog levels are (in descending order of priority):
25 # emerg alert crit err warning notice info debug
26 # the aliases "error", "panic", and "warn" are deprecated
27 # the "none" priority found in the original syslogd configuration is
28 # only used in internal messages created by syslogd
35 # disable the chained hostname format in logs
36 # (default is enabled)
39 # the time to wait before a died connection is re-established
43 # the time to wait before an idle destination file is closed
47 # the number of lines buffered before written to file
48 # you might want to increase this if your disk isn't catching with
49 # all the log messages you get or if you want less disk activity
54 # the number of lines fitting in the output queue
55 <%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.1" -%>
61 # enable or disable directory creation for destination files
64 # default owner, group, and permissions for log files
65 # (defaults are 0, 0, 0600)
70 # default owner, group, and permissions for created directories
71 # (defaults are 0, 0, 0700)
76 # enable or disable DNS usage
77 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
78 # a Denial of Service attack
82 # maximum length of message in bytes
83 # this is only limited by the program listening on the /dev/log Unix
84 # socket, glibc can handle arbitrary length log messages, but -- for
85 # example -- syslogd accepts only 1024 bytes
89 #Disable statistic log messages.
92 # Some program send log messages through a private implementation.
93 # and sometimes that implementation is bad. If this happen syslog-ng
94 # may recognise the program name as hostname. Whit this option
95 # we tell the syslog-ng that if a hostname match this regexp than that
96 # is not a real hostname.
97 bad_hostname("^gconfd$");
101 # We believe our own clock more than we believe the client clock.
109 # all known message sources
111 # message generated by Syslog-NG
113 <%- if has_variable?("syslogversion") and @syslogversion.to_s == "3.1" -%>
114 # standard Linux log source (this is the default place for the syslog()
115 # function to send logs to)
116 unix-stream("/dev/log");
117 # messages from the kernel
118 file("/proc/kmsg" program_override("kernel: "));
122 <%- if has_variable?("haproxy") && @haproxy -%>
123 unix-stream("/var/lib/haproxy/dev/log");
127 <%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") -%>
129 tcp6(port(5140) max-connections(400)
130 tls( key_file("/etc/exim4/ssl/thishost.key")
131 cert_file("/etc/exim4/ssl/thishost.crt")
132 ca_dir("/etc/exim4/ssl/")
138 <%- if (@hostname == "lully") -%>
139 source s_network_fastly {
140 tcp6(port(5141) max-connections(100)
141 tls( key_file("/etc/exim4/ssl/thishost.key")
142 cert_file("/etc/exim4/ssl/thishost.crt")
143 peer-verify(optional-untrusted))
152 # some standard log files
153 destination df_auth { file("/var/log/auth.log"); };
154 destination df_syslog { file("/var/log/syslog"); };
155 destination df_cron { file("/var/log/cron.log"); };
156 destination df_daemon { file("/var/log/daemon.log"); };
157 destination df_kern { file("/var/log/kern.log"); };
158 destination df_lpr { file("/var/log/lpr.log"); };
159 destination df_mail { file("/var/log/mail.log" group(maillog)); };
160 # destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
161 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
162 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
163 destination df_user { file("/var/log/user.log" perm(0644)); };
164 destination df_uucp { file("/var/log/uucp.log"); };
166 # these files are meant for the mail system log files
167 # and provide re-usable destinations for {mail,cron,...}.info,
168 # {mail,cron,...}.notice, etc.
169 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
170 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
171 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
172 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
173 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
175 # these files are meant for the news system, and are kept separated
176 # because they should be owned by "news" instead of "root"
177 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
178 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
179 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
181 # some more classical and useful files found in standard syslog configurations
182 destination df_debug { file("/var/log/debug"); };
183 destination df_messages { file("/var/log/messages"); };
185 <%- if @kernel == 'Linux' -%>
187 # a console to view log messages under X
188 destination dp_xconsole { pipe("/dev/xconsole"); };
192 # this will send messages to everyone logged in
193 destination du_all { usertty("*"); };
199 # all messages from the auth and authpriv facilities
200 filter f_auth { facility(auth, authpriv); };
202 # all messages except from the auth and authpriv facilities
203 filter f_syslog { not facility(auth, authpriv, mail); };
205 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
206 # and uucp facilities
207 filter f_cron { facility(cron); };
208 filter f_daemon { facility(daemon); };
209 filter f_kern { facility(kern); };
210 filter f_lpr { facility(lpr); };
211 filter f_mail { facility(mail); };
212 filter f_news { facility(news); };
213 filter f_user { facility(user); };
214 filter f_uucp { facility(uucp); };
216 # some filters to select messages of priority greater or equal to info, warn,
218 # (equivalents of syslogd's *.info, *.warn, and *.err)
219 filter f_at_least_info { level(info..emerg); };
220 filter f_at_least_notice { level(notice..emerg); };
221 filter f_at_least_warn { level(warn..emerg); };
222 filter f_at_least_err { level(err..emerg); };
223 filter f_at_least_crit { level(crit..emerg); };
225 # all messages of priority debug not coming from the auth, authpriv, news, and
227 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
229 # all messages of info, notice, or warn priority not coming form the auth,
230 # authpriv, cron, daemon, mail, and news facilities
232 level(info,notice,warn)
233 and not facility(auth,authpriv,cron,daemon,mail,news);
236 # messages with priority emerg
237 filter f_emerg { level(emerg); };
239 <%- if @kernel == 'Linux' -%>
240 # complex filter for messages usually sent to the xconsole
242 facility(daemon,mail)
243 or level(debug,info,notice,warn)
245 and level(crit,err,notice));
250 # order matters if you use "flags(final);" to mark the end of processing in a
253 ###############################################################################
254 ########## ON LOG CLIENTS #####################################################
255 ###############################################################################
256 ###############################################################################
257 ###############################################################################
258 # all log clients, including the log server, log their locally created
259 # messages to the standard places.
261 # auth,authpriv.* /var/log/auth.log
265 destination(df_auth);
268 # *.*;auth,authpriv.none -/var/log/syslog
272 destination(df_syslog);
275 # this is commented out in the default syslog.conf
276 # cron.* /var/log/cron.log
280 # destination(df_cron);
283 # daemon.* -/var/log/daemon.log
287 destination(df_daemon);
290 # kern.* -/var/log/kern.log
294 destination(df_kern);
297 # lpr.* -/var/log/lpr.log
304 # mail.* -/var/log/mail.log
308 destination(df_mail);
311 # user.* -/var/log/user.log
315 destination(df_user);
318 # uucp.* /var/log/uucp.log
322 destination(df_uucp);
325 # mail.info -/var/log/mail.info
329 # filter(f_at_least_info);
330 # destination(df_mail_info);
333 # mail.warn -/var/log/mail.warn
337 filter(f_at_least_warn);
338 destination(df_mail_warn);
341 # mail.err /var/log/mail.err
345 filter(f_at_least_err);
346 destination(df_mail_err);
349 # news.crit /var/log/news/news.crit
353 filter(f_at_least_crit);
354 destination(df_news_dot_crit);
357 # news.err /var/log/news/news.err
361 filter(f_at_least_err);
362 destination(df_news_dot_err);
365 # news.notice /var/log/news/news.notice
369 filter(f_at_least_notice);
370 destination(df_news_dot_notice);
375 # auth,authpriv.none;\
376 # news.none;mail.none -/var/log/debug
380 destination(df_debug);
384 # *.=info;*.=notice;*.=warn;\
385 # auth,authpriv.none;\
387 # mail,news.none -/var/log/messages
391 destination(df_messages);
402 <%- if @kernel == 'Linux' -%>
404 # news.crit;news.err;news.notice;\
406 # *.=notice;*.=warn |/dev/xconsole
410 destination(dp_xconsole);
415 <%- if @hostname != "lotti" -%>
416 destination loghost-lotti {
417 tcp("lotti.debian.org" port (5140)
418 tls( key_file("/etc/ssl/private/thishost.key")
419 cert_file("/etc/ssl/debian/certs/thishost.crt")
420 ca_dir("/etc/ssl/debian/certs/")
425 <%- if @hostname != "lully" -%>
426 destination loghost-lully {
427 tcp("lully.debian.org" port (5140)
428 tls( key_file("/etc/ssl/private/thishost.key")
429 cert_file("/etc/ssl/debian/certs/thishost.crt")
430 ca_dir("/etc/ssl/debian/certs/")
435 <%- if @hostname != "loghost-grnet-01" -%>
436 destination loghost-loghost-grnet-01 {
437 tcp("loghost-grnet-01.debian.org" port (5140)
438 tls( key_file("/etc/ssl/private/thishost.key")
439 cert_file("/etc/ssl/debian/certs/thishost.crt")
440 ca_dir("/etc/ssl/debian/certs/")
448 <%- if @hostname != "lotti" -%>
449 destination(loghost-lotti);
451 <%- if @hostname != "lully" -%>
452 destination(loghost-lully);
454 <%- if @hostname != "loghost-grnet-01" -%>
455 destination(loghost-loghost-grnet-01);
461 <%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") -%>
462 ###############################################################################
463 ########## ON LOG HOST ########################################################
464 ###############################################################################
465 ###############################################################################
467 # The log server, additionally, also logs all local and remote messages to
468 # a few special places.
469 destination hostdest_auth { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/auth.log"
470 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
471 destination hostdest_syslog { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/syslog"
472 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
473 destination hostdest_cron { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/cron.log"
474 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
475 destination hostdest_daemon { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/daemon.log"
476 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
477 destination hostdest_kern { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/kern.log"
478 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
479 destination hostdest_lpr { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/lpr.log"
480 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
481 destination hostdest_mail { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/mail.log"
482 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
483 destination hostdest_news { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/news.log"
484 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
485 destination hostdest_user { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/user.log"
486 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
487 destination hostdest_uucp { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/uucp.log"
488 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
489 destination hostdest_debug { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/debug"
490 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
491 destination hostdest_messages { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/messages"
492 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
495 #----------------------------------------------------------------------
496 # Special catch all destination hostdest_sorting by host
497 #----------------------------------------------------------------------
498 destination hostdest_facility_dot_info { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.info"
499 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
500 destination hostdest_facility_dot_notice { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.notice"
501 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
502 destination hostdest_facility_dot_warn { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.warn"
503 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
504 destination hostdest_facility_dot_err { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.err"
505 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
506 destination hostdest_facility_dot_crit { file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.crit"
507 owner(root) group(adm) perm(0640) dir_perm(0755) create_dirs(yes) dir_owner(root) dir_group(adm)); };
510 #----------------------------------------------------------------------
511 # Catch all log files
512 #----------------------------------------------------------------------
513 destination df_ALL_auth { file("/var/log/auth-all.log"); };
514 destination df_ALL_mail { file("/var/log/mail-all.log"); };
515 destination df_ALL_syslog { file("/var/log/syslog-all"); };
517 log { source(s_local);
519 filter(f_auth); destination(hostdest_auth); };
520 log { source(s_local);
522 filter(f_syslog); destination(hostdest_syslog); };
523 log { source(s_local);
525 filter(f_daemon); destination(hostdest_daemon); };
526 log { source(s_local);
528 filter(f_kern); destination(hostdest_kern); };
529 log { source(s_local);
531 filter(f_lpr); destination(hostdest_lpr); };
532 log { source(s_local);
534 filter(f_mail); destination(hostdest_mail); };
535 log { source(s_local);
537 filter(f_news); destination(hostdest_mail); };
538 log { source(s_local);
540 filter(f_user); destination(hostdest_user); };
541 log { source(s_local);
543 filter(f_uucp); destination(hostdest_uucp); };
544 log { source(s_local);
546 filter(f_debug); destination(hostdest_debug); };
547 log { source(s_local);
549 filter(f_messages); destination(hostdest_messages); };
551 log { source(s_local);
553 filter(f_mail); filter(f_at_least_info); destination(hostdest_facility_dot_info); };
554 log { source(s_local);
556 filter(f_mail); filter(f_at_least_warn); destination(hostdest_facility_dot_warn); };
557 log { source(s_local);
559 filter(f_mail); filter(f_at_least_err); destination(hostdest_facility_dot_err); };
563 log { source(s_local);
565 filter(f_auth); destination(df_ALL_auth); };
566 log { source(s_local);
568 filter(f_mail); destination(df_ALL_mail); };
569 log { source(s_local);
571 filter(f_syslog); destination(df_ALL_syslog); };
574 <%- if (@hostname == "lully") -%>
575 destination fastly { file("/var/log/fastly.log"); };
577 log { source(s_network_fastly);
578 destination(fastly); };