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: "));
114 # use the following line if you want to receive remote UDP logging messages
115 # (this is equivalent to the "-r" syslogd flag)
116 <% if hostname == "paganini" -%>
121 <% if hostname == "heininen" -%>
124 tls( key_file("/etc/exim4/ssl/thishost.key")
125 cert_file("/etc/exim4/ssl/thishost.cert")
126 ca_dir("/etc/exim4/ssl/")
136 # some standard log files
137 destination df_auth { file("/var/log/auth.log"); };
138 destination df_syslog { file("/var/log/syslog"); };
139 destination df_cron { file("/var/log/cron.log"); };
140 destination df_daemon { file("/var/log/daemon.log"); };
141 destination df_kern { file("/var/log/kern.log"); };
142 destination df_lpr { file("/var/log/lpr.log"); };
143 destination df_mail { file("/var/log/mail.log" group(maillog)); };
144 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
145 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
146 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
147 destination df_user { file("/var/log/user.log" perm(0644)); };
148 destination df_uucp { file("/var/log/uucp.log"); };
150 # these files are meant for the mail system log files
151 # and provide re-usable destinations for {mail,cron,...}.info,
152 # {mail,cron,...}.notice, etc.
153 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
154 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
155 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
156 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
157 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
159 # these files are meant for the news system, and are kept separated
160 # because they should be owned by "news" instead of "root"
161 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
162 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
163 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
165 # some more classical and useful files found in standard syslog configurations
166 destination df_debug { file("/var/log/debug"); };
167 destination df_messages { file("/var/log/messages"); };
169 <% if kernel == 'Linux' %>
171 # a console to view log messages under X
172 destination dp_xconsole { pipe("/dev/xconsole"); };
176 # this will send messages to everyone logged in
177 destination du_all { usertty("*"); };
183 # all messages from the auth and authpriv facilities
184 filter f_auth { facility(auth, authpriv); };
186 # all messages except from the auth and authpriv facilities
187 filter f_syslog { not facility(auth, authpriv); };
189 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
190 # and uucp facilities
191 filter f_cron { facility(cron); };
192 filter f_daemon { facility(daemon); };
193 filter f_kern { facility(kern); };
194 filter f_lpr { facility(lpr); };
195 filter f_mail { facility(mail); };
196 filter f_news { facility(news); };
197 filter f_user { facility(user); };
198 filter f_uucp { facility(uucp); };
200 # some filters to select messages of priority greater or equal to info, warn,
202 # (equivalents of syslogd's *.info, *.warn, and *.err)
203 filter f_at_least_info { level(info..emerg); };
204 filter f_at_least_notice { level(notice..emerg); };
205 filter f_at_least_warn { level(warn..emerg); };
206 filter f_at_least_err { level(err..emerg); };
207 filter f_at_least_crit { level(crit..emerg); };
209 # all messages of priority debug not coming from the auth, authpriv, news, and
211 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
213 # all messages of info, notice, or warn priority not coming form the auth,
214 # authpriv, cron, daemon, mail, and news facilities
216 level(info,notice,warn)
217 and not facility(auth,authpriv,cron,daemon,mail,news);
220 # messages with priority emerg
221 filter f_emerg { level(emerg); };
223 <% if kernel == 'Linux' %>
224 # complex filter for messages usually sent to the xconsole
226 facility(daemon,mail)
227 or level(debug,info,notice,warn)
229 and level(crit,err,notice));
235 # order matters if you use "flags(final);" to mark the end of processing in a
238 # these rules provide the same behavior as the commented original syslogd rules
240 # auth,authpriv.* /var/log/auth.log
243 <% if hostname == "heininen" -%>
247 destination(df_auth);
250 # *.*;auth,authpriv.none -/var/log/syslog
253 <% if hostname == "heininen" -%>
257 destination(df_syslog);
260 # this is commented out in the default syslog.conf
261 # cron.* /var/log/cron.log
265 # destination(df_cron);
268 # daemon.* -/var/log/daemon.log
271 <% if hostname == "heininen" -%>
275 destination(df_daemon);
278 # kern.* -/var/log/kern.log
281 <% if hostname == "heininen" -%>
285 destination(df_kern);
288 # lpr.* -/var/log/lpr.log
291 <% if hostname == "heininen" -%>
298 # mail.* -/var/log/mail.log
301 <% if hostname == "heininen" -%>
305 destination(df_mail);
308 # user.* -/var/log/user.log
311 <% if hostname == "heininen" -%>
315 destination(df_user);
318 # uucp.* /var/log/uucp.log
321 <% if hostname == "heininen" -%>
325 destination(df_uucp);
328 # mail.info -/var/log/mail.info
331 <% if hostname == "heininen" -%>
335 filter(f_at_least_info);
336 destination(df_mail_info);
339 # mail.warn -/var/log/mail.warn
342 <% if hostname == "heininen" -%>
346 filter(f_at_least_warn);
347 destination(df_mail_warn);
350 # mail.err /var/log/mail.err
353 <% if hostname == "heininen" -%>
357 filter(f_at_least_err);
358 destination(df_mail_err);
361 # news.crit /var/log/news/news.crit
364 <% if hostname == "heininen" -%>
368 filter(f_at_least_crit);
369 destination(df_news_dot_crit);
372 # news.err /var/log/news/news.err
375 <% if hostname == "heininen" -%>
379 filter(f_at_least_err);
380 destination(df_news_dot_err);
383 # news.notice /var/log/news/news.notice
386 <% if hostname == "heininen" -%>
390 filter(f_at_least_notice);
391 destination(df_news_dot_notice);
396 # auth,authpriv.none;\
397 # news.none;mail.none -/var/log/debug
400 <% if hostname == "heininen" -%>
404 destination(df_debug);
408 # *.=info;*.=notice;*.=warn;\
409 # auth,authpriv.none;\
411 # mail,news.none -/var/log/messages
414 <% if hostname == "heininen" -%>
418 destination(df_messages);
424 <% if hostname == "heininen" -%>
432 <% if kernel == 'Linux' %>
434 # news.crit;news.err;news.notice;\
436 # *.=notice;*.=warn |/dev/xconsole
439 <% if hostname == "heininen" -%>
443 destination(dp_xconsole);
447 <% if hostname == "corelli" -%>
448 destination loghost-paganini {
449 udp("192.168.2.10",port(514));
454 destination(loghost-paganini);