1 <% if syslogversion == "3" -%>
5 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
6 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
10 # Configuration file for syslog-ng under Debian
12 # attempts at reproducing default syslog behavior
14 # the standard syslog levels are (in descending order of priority):
15 # emerg alert crit err warning notice info debug
16 # the aliases "error", "panic", and "warn" are deprecated
17 # the "none" priority found in the original syslogd configuration is
18 # only used in internal messages created by syslogd
25 # disable the chained hostname format in logs
26 # (default is enabled)
29 # the time to wait before a died connection is re-established
33 # the time to wait before an idle destination file is closed
37 # the number of lines buffered before written to file
38 # you might want to increase this if your disk isn't catching with
39 # all the log messages you get or if you want less disk activity
44 # the number of lines fitting in the output queue
47 # enable or disable directory creation for destination files
50 # default owner, group, and permissions for log files
51 # (defaults are 0, 0, 0600)
56 # default owner, group, and permissions for created directories
57 # (defaults are 0, 0, 0700)
62 # enable or disable DNS usage
63 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
64 # a Denial of Service attack
68 # maximum length of message in bytes
69 # this is only limited by the program listening on the /dev/log Unix
70 # socket, glibc can handle arbitrary length log messages, but -- for
71 # example -- syslogd accepts only 1024 bytes
75 #Disable statistic log messages.
78 # Some program send log messages through a private implementation.
79 # and sometimes that implementation is bad. If this happen syslog-ng
80 # may recognise the program name as hostname. Whit this option
81 # we tell the syslog-ng that if a hostname match this regexp than that
82 # is not a real hostname.
83 bad_hostname("^gconfd$");
85 <% if hostname == "heininen" -%>
86 # we trust our mutual authenticated syslog clients
96 # all known message sources
98 # message generated by Syslog-NG
100 <% if kernel == 'Linux' %>
101 # standard Linux log source (this is the default place for the syslog()
102 # function to send logs to)
103 unix-stream("/dev/log");
104 # messages from the kernel
105 <% if syslogversion == "2" -%>
106 file("/proc/kmsg" log_prefix("kernel: "));
108 file("/proc/kmsg" program_override("kernel: "));
111 # standard Linux log source (this is the default place for the syslog()
112 # function to send logs to)
113 unix-dgram("/var/run/log");
114 # messages from the kernel
115 <% if syslogversion == "2" -%>
116 file("/dev/klog" log_prefix("kernel: "));
118 file("/dev/klog" program_override("kernel: "));
121 <% if hostname == "paganini" -%>
122 # use the following line if you want to receive remote UDP logging messages
123 # (this is equivalent to the "-r" syslogd flag)
128 <% if hostname == "heininen" -%>
131 tls( key_file("/etc/exim4/ssl/thishost.key")
132 cert_file("/etc/exim4/ssl/thishost.crt")
133 ca_dir("/etc/exim4/ssl/")
143 # some standard log files
144 destination df_auth { file("/var/log/auth.log"); };
145 destination df_syslog { file("/var/log/syslog"); };
146 destination df_cron { file("/var/log/cron.log"); };
147 destination df_daemon { file("/var/log/daemon.log"); };
148 destination df_kern { file("/var/log/kern.log"); };
149 destination df_lpr { file("/var/log/lpr.log"); };
150 destination df_mail { file("/var/log/mail.log" group(maillog)); };
151 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
152 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
153 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
154 destination df_user { file("/var/log/user.log" perm(0644)); };
155 destination df_uucp { file("/var/log/uucp.log"); };
157 # these files are meant for the mail system log files
158 # and provide re-usable destinations for {mail,cron,...}.info,
159 # {mail,cron,...}.notice, etc.
160 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
161 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
162 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
163 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
164 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
166 # these files are meant for the news system, and are kept separated
167 # because they should be owned by "news" instead of "root"
168 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
169 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
170 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
172 # some more classical and useful files found in standard syslog configurations
173 destination df_debug { file("/var/log/debug"); };
174 destination df_messages { file("/var/log/messages"); };
176 <% if kernel == 'Linux' %>
178 # a console to view log messages under X
179 destination dp_xconsole { pipe("/dev/xconsole"); };
183 # this will send messages to everyone logged in
184 destination du_all { usertty("*"); };
190 # all messages from the auth and authpriv facilities
191 filter f_auth { facility(auth, authpriv); };
193 # all messages except from the auth and authpriv facilities
194 filter f_syslog { not facility(auth, authpriv); };
196 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
197 # and uucp facilities
198 filter f_cron { facility(cron); };
199 filter f_daemon { facility(daemon); };
200 filter f_kern { facility(kern); };
201 filter f_lpr { facility(lpr); };
202 filter f_mail { facility(mail); };
203 filter f_news { facility(news); };
204 filter f_user { facility(user); };
205 filter f_uucp { facility(uucp); };
207 # some filters to select messages of priority greater or equal to info, warn,
209 # (equivalents of syslogd's *.info, *.warn, and *.err)
210 filter f_at_least_info { level(info..emerg); };
211 filter f_at_least_notice { level(notice..emerg); };
212 filter f_at_least_warn { level(warn..emerg); };
213 filter f_at_least_err { level(err..emerg); };
214 filter f_at_least_crit { level(crit..emerg); };
216 # all messages of priority debug not coming from the auth, authpriv, news, and
218 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
220 # all messages of info, notice, or warn priority not coming form the auth,
221 # authpriv, cron, daemon, mail, and news facilities
223 level(info,notice,warn)
224 and not facility(auth,authpriv,cron,daemon,mail,news);
227 # messages with priority emerg
228 filter f_emerg { level(emerg); };
230 <% if kernel == 'Linux' %>
231 # complex filter for messages usually sent to the xconsole
233 facility(daemon,mail)
234 or level(debug,info,notice,warn)
236 and level(crit,err,notice));
242 # order matters if you use "flags(final);" to mark the end of processing in a
245 # these rules provide the same behavior as the commented original syslogd rules
247 # auth,authpriv.* /var/log/auth.log
250 <% if hostname == "heininen" -%>
254 destination(df_auth);
257 # *.*;auth,authpriv.none -/var/log/syslog
260 <% if hostname == "heininen" -%>
264 destination(df_syslog);
267 # this is commented out in the default syslog.conf
268 # cron.* /var/log/cron.log
272 # destination(df_cron);
275 # daemon.* -/var/log/daemon.log
278 <% if hostname == "heininen" -%>
282 destination(df_daemon);
285 # kern.* -/var/log/kern.log
288 <% if hostname == "heininen" -%>
292 destination(df_kern);
295 # lpr.* -/var/log/lpr.log
298 <% if hostname == "heininen" -%>
305 # mail.* -/var/log/mail.log
308 <% if hostname == "heininen" -%>
312 destination(df_mail);
315 # user.* -/var/log/user.log
318 <% if hostname == "heininen" -%>
322 destination(df_user);
325 # uucp.* /var/log/uucp.log
328 <% if hostname == "heininen" -%>
332 destination(df_uucp);
335 # mail.info -/var/log/mail.info
338 <% if hostname == "heininen" -%>
342 filter(f_at_least_info);
343 destination(df_mail_info);
346 # mail.warn -/var/log/mail.warn
349 <% if hostname == "heininen" -%>
353 filter(f_at_least_warn);
354 destination(df_mail_warn);
357 # mail.err /var/log/mail.err
360 <% if hostname == "heininen" -%>
364 filter(f_at_least_err);
365 destination(df_mail_err);
368 # news.crit /var/log/news/news.crit
371 <% if hostname == "heininen" -%>
375 filter(f_at_least_crit);
376 destination(df_news_dot_crit);
379 # news.err /var/log/news/news.err
382 <% if hostname == "heininen" -%>
386 filter(f_at_least_err);
387 destination(df_news_dot_err);
390 # news.notice /var/log/news/news.notice
393 <% if hostname == "heininen" -%>
397 filter(f_at_least_notice);
398 destination(df_news_dot_notice);
403 # auth,authpriv.none;\
404 # news.none;mail.none -/var/log/debug
407 <% if hostname == "heininen" -%>
411 destination(df_debug);
415 # *.=info;*.=notice;*.=warn;\
416 # auth,authpriv.none;\
418 # mail,news.none -/var/log/messages
421 <% if hostname == "heininen" -%>
425 destination(df_messages);
431 <% if hostname == "heininen" -%>
439 <% if kernel == 'Linux' %>
441 # news.crit;news.err;news.notice;\
443 # *.=notice;*.=warn |/dev/xconsole
446 <% if hostname == "heininen" -%>
450 destination(dp_xconsole);
454 <% if hostname != "heininen" -%>
455 <% if syslogversion == "3" %>
456 destination loghost-heininen {
457 tcp("heininen.debian.org" port (5140)
458 tls( key_file("/etc/ssl/debian/keys/thishost.key")
459 cert_file("/etc/ssl/debian/certs/thishost.crt")
460 ca_dir("/etc/ssl/debian/certs/")
466 destination(loghost-heininen);