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: "));
104 # standard Linux log source (this is the default place for the syslog()
105 # function to send logs to)
106 unix-dgram("/var/run/log");
107 # messages from the kernel
108 <% if syslogversion == "2" -%>
109 file("/dev/klog" log_prefix("kernel: "));
111 file("/dev/klog" program_override("kernel: "));
113 # use the following line if you want to receive remote UDP logging messages
114 # (this is equivalent to the "-r" syslogd flag)
115 <% if hostname == "paganini" -%>
120 <% if hostname == "heininen" -%>
123 tls( key_file("/etc/exim4/ssl/thishost.key")
124 cert_file("/etc/exim4/ssl/thishost.cert")
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); };
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));
234 # order matters if you use "flags(final);" to mark the end of processing in a
237 # these rules provide the same behavior as the commented original syslogd rules
239 # auth,authpriv.* /var/log/auth.log
242 <% if hostname == "heininen" -%>
246 destination(df_auth);
249 # *.*;auth,authpriv.none -/var/log/syslog
252 <% if hostname == "heininen" -%>
256 destination(df_syslog);
259 # this is commented out in the default syslog.conf
260 # cron.* /var/log/cron.log
264 # destination(df_cron);
267 # daemon.* -/var/log/daemon.log
270 <% if hostname == "heininen" -%>
274 destination(df_daemon);
277 # kern.* -/var/log/kern.log
280 <% if hostname == "heininen" -%>
284 destination(df_kern);
287 # lpr.* -/var/log/lpr.log
290 <% if hostname == "heininen" -%>
297 # mail.* -/var/log/mail.log
300 <% if hostname == "heininen" -%>
304 destination(df_mail);
307 # user.* -/var/log/user.log
310 <% if hostname == "heininen" -%>
314 destination(df_user);
317 # uucp.* /var/log/uucp.log
320 <% if hostname == "heininen" -%>
324 destination(df_uucp);
327 # mail.info -/var/log/mail.info
330 <% if hostname == "heininen" -%>
334 filter(f_at_least_info);
335 destination(df_mail_info);
338 # mail.warn -/var/log/mail.warn
341 <% if hostname == "heininen" -%>
345 filter(f_at_least_warn);
346 destination(df_mail_warn);
349 # mail.err /var/log/mail.err
352 <% if hostname == "heininen" -%>
356 filter(f_at_least_err);
357 destination(df_mail_err);
360 # news.crit /var/log/news/news.crit
363 <% if hostname == "heininen" -%>
367 filter(f_at_least_crit);
368 destination(df_news_dot_crit);
371 # news.err /var/log/news/news.err
374 <% if hostname == "heininen" -%>
378 filter(f_at_least_err);
379 destination(df_news_dot_err);
382 # news.notice /var/log/news/news.notice
385 <% if hostname == "heininen" -%>
389 filter(f_at_least_notice);
390 destination(df_news_dot_notice);
395 # auth,authpriv.none;\
396 # news.none;mail.none -/var/log/debug
399 <% if hostname == "heininen" -%>
403 destination(df_debug);
407 # *.=info;*.=notice;*.=warn;\
408 # auth,authpriv.none;\
410 # mail,news.none -/var/log/messages
413 <% if hostname == "heininen" -%>
417 destination(df_messages);
423 <% if hostname == "heininen" -%>
431 <% if kernel == 'Linux' %>
433 # news.crit;news.err;news.notice;\
435 # *.=notice;*.=warn |/dev/xconsole
438 <% if hostname == "heininen" -%>
442 destination(dp_xconsole);
446 <% if hostname == "corelli" -%>
447 destination loghost-paganini {
448 udp("192.168.2.10",port(514));
453 destination(loghost-paganini);