2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
7 # Configuration file for syslog-ng under Debian
9 # attempts at reproducing default syslog behavior
11 # the standard syslog levels are (in descending order of priority):
12 # emerg alert crit err warning notice info debug
13 # the aliases "error", "panic", and "warn" are deprecated
14 # the "none" priority found in the original syslogd configuration is
15 # only used in internal messages created by syslogd
22 # disable the chained hostname format in logs
23 # (default is enabled)
26 # the time to wait before a died connection is re-established
30 # the time to wait before an idle destination file is closed
34 # the number of lines buffered before written to file
35 # you might want to increase this if your disk isn't catching with
36 # all the log messages you get or if you want less disk activity
41 # the number of lines fitting in the output queue
44 # enable or disable directory creation for destination files
47 # default owner, group, and permissions for log files
48 # (defaults are 0, 0, 0600)
53 # default owner, group, and permissions for created directories
54 # (defaults are 0, 0, 0700)
59 # enable or disable DNS usage
60 # syslog-ng blocks on DNS queries, so enabling DNS may lead to
61 # a Denial of Service attack
65 # maximum length of message in bytes
66 # this is only limited by the program listening on the /dev/log Unix
67 # socket, glibc can handle arbitrary length log messages, but -- for
68 # example -- syslogd accepts only 1024 bytes
72 #Disable statistic log messages.
75 # Some program send log messages through a private implementation.
76 # and sometimes that implementation is bad. If this happen syslog-ng
77 # may recognise the program name as hostname. Whit this option
78 # we tell the syslog-ng that if a hostname match this regexp than that
79 # is not a real hostname.
80 bad_hostname("^gconfd$");
87 # all known message sources
89 # message generated by Syslog-NG
91 <% if kernel == 'Linux' %>
92 # standard Linux log source (this is the default place for the syslog()
93 # function to send logs to)
94 unix-stream("/dev/log");
95 # messages from the kernel
96 file("/proc/kmsg" log_prefix("kernel: "));
98 # standard Linux log source (this is the default place for the syslog()
99 # function to send logs to)
100 unix-dgram("/var/run/log");
101 # messages from the kernel
102 file("/dev/klog" log_prefix("kernel: "));
104 # use the following line if you want to receive remote UDP logging messages
105 # (this is equivalent to the "-r" syslogd flag)
106 <% if hostname == "paganini" -%>
115 # some standard log files
116 destination df_auth { file("/var/log/auth.log"); };
117 destination df_syslog { file("/var/log/syslog"); };
118 destination df_cron { file("/var/log/cron.log"); };
119 destination df_daemon { file("/var/log/daemon.log"); };
120 destination df_kern { file("/var/log/kern.log"); };
121 destination df_lpr { file("/var/log/lpr.log"); };
122 destination df_mail { file("/var/log/mail.log" group(maillog)); };
123 destination df_mail_info { file("/var/log/mail.info" group(maillog)); };
124 destination df_mail_warn { file("/var/log/mail.warn" group(maillog)); };
125 destination df_mail_err { file("/var/log/mail.err" group(maillog)); };
126 destination df_user { file("/var/log/user.log" perm(0644)); };
127 destination df_uucp { file("/var/log/uucp.log"); };
129 # these files are meant for the mail system log files
130 # and provide re-usable destinations for {mail,cron,...}.info,
131 # {mail,cron,...}.notice, etc.
132 destination df_facility_dot_info { file("/var/log/$FACILITY.info"); };
133 destination df_facility_dot_notice { file("/var/log/$FACILITY.notice"); };
134 destination df_facility_dot_warn { file("/var/log/$FACILITY.warn"); };
135 destination df_facility_dot_err { file("/var/log/$FACILITY.err"); };
136 destination df_facility_dot_crit { file("/var/log/$FACILITY.crit"); };
138 # these files are meant for the news system, and are kept separated
139 # because they should be owned by "news" instead of "root"
140 destination df_news_dot_notice { file("/var/log/news/news.notice" owner("news")); };
141 destination df_news_dot_err { file("/var/log/news/news.err" owner("news")); };
142 destination df_news_dot_crit { file("/var/log/news/news.crit" owner("news")); };
144 # some more classical and useful files found in standard syslog configurations
145 destination df_debug { file("/var/log/debug"); };
146 destination df_messages { file("/var/log/messages"); };
148 <% if kernel == 'Linux' %>
150 # a console to view log messages under X
151 destination dp_xconsole { pipe("/dev/xconsole"); };
155 # this will send messages to everyone logged in
156 destination du_all { usertty("*"); };
162 # all messages from the auth and authpriv facilities
163 filter f_auth { facility(auth, authpriv); };
165 # all messages except from the auth and authpriv facilities
166 filter f_syslog { not facility(auth, authpriv); };
168 # respectively: messages from the cron, daemon, kern, lpr, mail, news, user,
169 # and uucp facilities
170 filter f_cron { facility(cron); };
171 filter f_daemon { facility(daemon); };
172 filter f_kern { facility(kern); };
173 filter f_lpr { facility(lpr); };
174 filter f_mail { facility(mail); };
175 filter f_news { facility(news); };
176 filter f_user { facility(user); };
177 filter f_uucp { facility(uucp); };
179 # some filters to select messages of priority greater or equal to info, warn,
181 # (equivalents of syslogd's *.info, *.warn, and *.err)
182 filter f_at_least_info { level(info..emerg); };
183 filter f_at_least_notice { level(notice..emerg); };
184 filter f_at_least_warn { level(warn..emerg); };
185 filter f_at_least_err { level(err..emerg); };
186 filter f_at_least_crit { level(crit..emerg); };
188 # all messages of priority debug not coming from the auth, authpriv, news, and
190 filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); };
192 # all messages of info, notice, or warn priority not coming form the auth,
193 # authpriv, cron, daemon, mail, and news facilities
195 level(info,notice,warn)
196 and not facility(auth,authpriv,cron,daemon,mail,news);
199 # messages with priority emerg
200 filter f_emerg { level(emerg); };
202 <% if kernel == 'Linux' %>
203 # complex filter for messages usually sent to the xconsole
205 facility(daemon,mail)
206 or level(debug,info,notice,warn)
208 and level(crit,err,notice));
214 # order matters if you use "flags(final);" to mark the end of processing in a
217 # these rules provide the same behavior as the commented original syslogd rules
219 # auth,authpriv.* /var/log/auth.log
223 destination(df_auth);
226 # *.*;auth,authpriv.none -/var/log/syslog
230 destination(df_syslog);
233 # this is commented out in the default syslog.conf
234 # cron.* /var/log/cron.log
238 # destination(df_cron);
241 # daemon.* -/var/log/daemon.log
245 destination(df_daemon);
248 # kern.* -/var/log/kern.log
252 destination(df_kern);
255 # lpr.* -/var/log/lpr.log
262 # mail.* -/var/log/mail.log
266 destination(df_mail);
269 # user.* -/var/log/user.log
273 destination(df_user);
276 # uucp.* /var/log/uucp.log
280 destination(df_uucp);
283 # mail.info -/var/log/mail.info
287 filter(f_at_least_info);
288 destination(df_mail_info);
291 # mail.warn -/var/log/mail.warn
295 filter(f_at_least_warn);
296 destination(df_mail_warn);
299 # mail.err /var/log/mail.err
303 filter(f_at_least_err);
304 destination(df_mail_err);
307 # news.crit /var/log/news/news.crit
311 filter(f_at_least_crit);
312 destination(df_news_dot_crit);
315 # news.err /var/log/news/news.err
319 filter(f_at_least_err);
320 destination(df_news_dot_err);
323 # news.notice /var/log/news/news.notice
327 filter(f_at_least_notice);
328 destination(df_news_dot_notice);
333 # auth,authpriv.none;\
334 # news.none;mail.none -/var/log/debug
338 destination(df_debug);
342 # *.=info;*.=notice;*.=warn;\
343 # auth,authpriv.none;\
345 # mail,news.none -/var/log/messages
349 destination(df_messages);
360 <% if kernel == 'Linux' %>
362 # news.crit;news.err;news.notice;\
364 # *.=notice;*.=warn |/dev/xconsole
368 destination(dp_xconsole);
372 <% if hostname == "corelli" -%>
373 destination loghost-paganini {
374 udp("192.168.2.10",port(514));
379 destination(loghost-paganini);