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$");
90 # all known message sources
92 # message generated by Syslog-NG
94 <% if kernel == 'Linux' %>
95 # standard Linux log source (this is the default place for the syslog()
96 # function to send logs to)
97 unix-stream("/dev/log");
98 # messages from the kernel
99 <% if syslogversion == "2" -%>
100 file("/proc/kmsg" log_prefix("kernel: "));
102 file("/proc/kmsg" program_override("kernel: "));
105 # standard Linux log source (this is the default place for the syslog()
106 # function to send logs to)
107 unix-dgram("/var/run/log");
108 # messages from the kernel
109 <% if syslogversion == "2" -%>
110 file("/dev/klog" log_prefix("kernel: "));
112 file("/dev/klog" program_override("kernel: "));
115 <% if hostname == "paganini" -%>
116 # use the following line if you want to receive remote UDP logging messages
117 # (this is equivalent to the "-r" syslogd flag)
122 <% if hostname == "heininen" -%>
125 tls( key_file("/etc/exim4/ssl/thishost.key")
126 cert_file("/etc/exim4/ssl/thishost.cert")
127 ca_dir("/etc/exim4/ssl/")
137 # some standard log files
138 destination df_auth { file("/var/log/auth.log"); };
139 destination df_syslog { file("/var/log/syslog"); };
140 destination df_cron { file("/var/log/cron.log"); };
141 destination df_daemon { file("/var/log/daemon.log"); };
142 destination df_kern { file("/var/log/kern.log"); };
143 destination df_lpr { file("/var/log/lpr.log"); };
144 destination df_mail { file("/var/log/mail.log" group(maillog)); };
145 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
146 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
147 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
148 destination df_user { file("/var/log/user.log" perm(0644)); };
149 destination df_uucp { file("/var/log/uucp.log"); };
151 # these files are meant for the mail system log files
152 # and provide re-usable destinations for {mail,cron,...}.info,
153 # {mail,cron,...}.notice, etc.
154 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
155 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
156 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
157 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
158 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
160 # these files are meant for the news system, and are kept separated
161 # because they should be owned by "news" instead of "root"
162 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
163 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
164 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
166 # some more classical and useful files found in standard syslog configurations
167 destination df_debug { file("/var/log/debug"); };
168 destination df_messages { file("/var/log/messages"); };
170 <% if kernel == 'Linux' %>
172 # a console to view log messages under X
173 destination dp_xconsole { pipe("/dev/xconsole"); };
177 # this will send messages to everyone logged in
178 destination du_all { usertty("*"); };
184 # all messages from the auth and authpriv facilities
185 filter f_auth { facility(auth, authpriv); };
187 # all messages except from the auth and authpriv facilities
188 filter f_syslog { not facility(auth, authpriv); };
190 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
191 # and uucp facilities
192 filter f_cron { facility(cron); };
193 filter f_daemon { facility(daemon); };
194 filter f_kern { facility(kern); };
195 filter f_lpr { facility(lpr); };
196 filter f_mail { facility(mail); };
197 filter f_news { facility(news); };
198 filter f_user { facility(user); };
199 filter f_uucp { facility(uucp); };
201 # some filters to select messages of priority greater or equal to info, warn,
203 # (equivalents of syslogd's *.info, *.warn, and *.err)
204 filter f_at_least_info { level(info..emerg); };
205 filter f_at_least_notice { level(notice..emerg); };
206 filter f_at_least_warn { level(warn..emerg); };
207 filter f_at_least_err { level(err..emerg); };
208 filter f_at_least_crit { level(crit..emerg); };
210 # all messages of priority debug not coming from the auth, authpriv, news, and
212 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
214 # all messages of info, notice, or warn priority not coming form the auth,
215 # authpriv, cron, daemon, mail, and news facilities
217 level(info,notice,warn)
218 and not facility(auth,authpriv,cron,daemon,mail,news);
221 # messages with priority emerg
222 filter f_emerg { level(emerg); };
224 <% if kernel == 'Linux' %>
225 # complex filter for messages usually sent to the xconsole
227 facility(daemon,mail)
228 or level(debug,info,notice,warn)
230 and level(crit,err,notice));
236 # order matters if you use "flags(final);" to mark the end of processing in a
239 # these rules provide the same behavior as the commented original syslogd rules
241 # auth,authpriv.* /var/log/auth.log
244 <% if hostname == "heininen" -%>
248 destination(df_auth);
251 # *.*;auth,authpriv.none -/var/log/syslog
254 <% if hostname == "heininen" -%>
258 destination(df_syslog);
261 # this is commented out in the default syslog.conf
262 # cron.* /var/log/cron.log
266 # destination(df_cron);
269 # daemon.* -/var/log/daemon.log
272 <% if hostname == "heininen" -%>
276 destination(df_daemon);
279 # kern.* -/var/log/kern.log
282 <% if hostname == "heininen" -%>
286 destination(df_kern);
289 # lpr.* -/var/log/lpr.log
292 <% if hostname == "heininen" -%>
299 # mail.* -/var/log/mail.log
302 <% if hostname == "heininen" -%>
306 destination(df_mail);
309 # user.* -/var/log/user.log
312 <% if hostname == "heininen" -%>
316 destination(df_user);
319 # uucp.* /var/log/uucp.log
322 <% if hostname == "heininen" -%>
326 destination(df_uucp);
329 # mail.info -/var/log/mail.info
332 <% if hostname == "heininen" -%>
336 filter(f_at_least_info);
337 destination(df_mail_info);
340 # mail.warn -/var/log/mail.warn
343 <% if hostname == "heininen" -%>
347 filter(f_at_least_warn);
348 destination(df_mail_warn);
351 # mail.err /var/log/mail.err
354 <% if hostname == "heininen" -%>
358 filter(f_at_least_err);
359 destination(df_mail_err);
362 # news.crit /var/log/news/news.crit
365 <% if hostname == "heininen" -%>
369 filter(f_at_least_crit);
370 destination(df_news_dot_crit);
373 # news.err /var/log/news/news.err
376 <% if hostname == "heininen" -%>
380 filter(f_at_least_err);
381 destination(df_news_dot_err);
384 # news.notice /var/log/news/news.notice
387 <% if hostname == "heininen" -%>
391 filter(f_at_least_notice);
392 destination(df_news_dot_notice);
397 # auth,authpriv.none;\
398 # news.none;mail.none -/var/log/debug
401 <% if hostname == "heininen" -%>
405 destination(df_debug);
409 # *.=info;*.=notice;*.=warn;\
410 # auth,authpriv.none;\
412 # mail,news.none -/var/log/messages
415 <% if hostname == "heininen" -%>
419 destination(df_messages);
425 <% if hostname == "heininen" -%>
433 <% if kernel == 'Linux' %>
435 # news.crit;news.err;news.notice;\
437 # *.=notice;*.=warn |/dev/xconsole
440 <% if hostname == "heininen" -%>
444 destination(dp_xconsole);
448 <% if hostname == "corelli" -%>
449 destination loghost-paganini {
450 udp("192.168.2.10",port(514));
455 destination(loghost-paganini);