1 |
@version:3.2 |
2 |
|
3 |
# vim:ft=conf:ai:si:ts=8:sw=8:et: |
4 |
# |
5 |
# syslog-ng configuration file. |
6 |
# |
7 |
# See syslog-ng(8) and syslog-ng.conf(5) for more information. |
8 |
# |
9 |
|
10 |
# Options |
11 |
options { |
12 |
flush_lines (0); |
13 |
time_reopen (10); |
14 |
log_fifo_size (1000); |
15 |
long_hostnames (off); |
16 |
use_dns (no); |
17 |
use_fqdn (no); |
18 |
keep_hostname (yes); |
19 |
|
20 |
create_dirs (yes); |
21 |
owner ("root"); |
22 |
group ("adm"); |
23 |
perm (0640); |
24 |
dir_owner ("root"); |
25 |
dir_group ("adm"); |
26 |
dir_perm (0755); |
27 |
}; |
28 |
|
29 |
# Sources |
30 |
source s_sys { |
31 |
file ("/proc/kmsg" program_override("kernel: ")); |
32 |
unix-stream ("/dev/log"); |
33 |
internal(); |
34 |
# udp(ip(0.0.0.0) port(514)); |
35 |
}; |
36 |
|
37 |
# Sensible stuff |
38 |
destination d_auth { file("/var/log/auth.log"); }; |
39 |
|
40 |
# Generic stuff |
41 |
destination d_messages { file("/var/log/messages"); }; |
42 |
destination d_syslog { file("/var/log/syslog"); }; |
43 |
destination d_user { file("/var/log/user.log"); }; |
44 |
|
45 |
# Mail logging |
46 |
destination d_mailinfo { file("/var/log/mail/info.log"); }; |
47 |
destination d_mailwarn { file("/var/log/mail/warnings.log"); }; |
48 |
destination d_mailerr { file("/var/log/mail/errors.log"); }; |
49 |
|
50 |
# Cron logging |
51 |
destination d_croninfo { file("/var/log/cron/info.log"); }; |
52 |
destination d_cronwarn { file("/var/log/cron/warnings.log"); }; |
53 |
destination d_cronerr { file("/var/log/cron/errors.log"); }; |
54 |
|
55 |
# Kernel logging |
56 |
destination d_kerninfo { file("/var/log/kernel/info.log"); }; |
57 |
destination d_kernwarn { file("/var/log/kernel/warnings.log"); }; |
58 |
destination d_kernerr { file("/var/log/kernel/errors.log"); }; |
59 |
|
60 |
# Daemons logging |
61 |
destination d_daemoninfo { file("/var/log/daemons/info.log"); }; |
62 |
destination d_daemonwarn { file("/var/log/daemons/warnings.log"); }; |
63 |
destination d_daemonerr { file("/var/log/daemons/errors.log"); }; |
64 |
|
65 |
# Drakxtools logging |
66 |
destination d_drakxtools { file("/var/log/drakxtools.log"); }; |
67 |
|
68 |
# Boot messages logging |
69 |
destination d_boot { file("/var/log/boot.log"); }; |
70 |
|
71 |
# Emergency messages for logged users |
72 |
destination d_emergall { usertty("*"); }; |
73 |
|
74 |
# All messages on last terminal |
75 |
destination d_consoleall { file("/dev/tty12"); }; |
76 |
|
77 |
# Generic filters |
78 |
filter f_info { level(debug,info,notice); }; |
79 |
filter f_warn { level(warn); }; |
80 |
filter f_err { level(err..emerg); }; |
81 |
filter f_emergency { level(emerg); }; |
82 |
filter f_mail { facility(mail); }; |
83 |
filter f_cron { facility(cron); }; |
84 |
filter f_kernel { facility(kern); }; |
85 |
filter f_daemon { facility(daemon); }; |
86 |
|
87 |
# Specific filters |
88 |
filter f_auth { facility(auth,authpriv); }; |
89 |
filter f_messages { level(info..emerg) and not facility(mail,news,authpriv); }; |
90 |
filter f_syslog { not facility(auth, authpriv); }; |
91 |
filter f_user { facility(user); }; |
92 |
filter f_drakxtools { facility(local1); }; |
93 |
filter f_boot { facility(local7); }; |
94 |
|
95 |
# Log to logfiles |
96 |
log { filter(f_auth); destination(d_auth); flags(catch-all); }; |
97 |
log { filter(f_messages); destination(d_messages); flags(catch-all); }; |
98 |
log { filter(f_syslog); destination(d_syslog); flags(catch-all); }; |
99 |
log { filter(f_user); destination(d_user); flags(catch-all); }; |
100 |
log { filter(f_mail); filter(f_info); destination(d_mailinfo); flags(catch-all); }; |
101 |
log { filter(f_mail); filter(f_warn); destination(d_mailwarn); flags(catch-all); }; |
102 |
log { filter(f_mail); filter(f_err); destination(d_mailerr); flags(catch-all); }; |
103 |
log { filter(f_cron); filter(f_info); destination(d_croninfo); flags(catch-all); }; |
104 |
log { filter(f_cron); filter(f_warn); destination(d_cronwarn); flags(catch-all); }; |
105 |
log { filter(f_cron); filter(f_err); destination(d_cronerr); flags(catch-all); }; |
106 |
log { filter(f_kernel); filter(f_info); destination(d_kerninfo); flags(catch-all); }; |
107 |
log { filter(f_kernel); filter(f_warn); destination(d_kernwarn); flags(catch-all); }; |
108 |
log { filter(f_kernel); filter(f_err); destination(d_kernerr); flags(catch-all); }; |
109 |
log { filter(f_daemon); filter(f_info); destination(d_daemoninfo); flags(catch-all); }; |
110 |
log { filter(f_daemon); filter(f_warn); destination(d_daemonwarn); flags(catch-all); }; |
111 |
log { filter(f_daemon); filter(f_err); destination(d_daemonerr); flags(catch-all); }; |
112 |
log { filter(f_boot); destination(d_boot); flags(catch-all); }; |
113 |
log { filter(f_drakxtools); destination(d_drakxtools); flags(catch-all); }; |
114 |
|
115 |
# Log to console |
116 |
log { filter(f_emergency); destination(d_emergall); flags(catch-all); }; |
117 |
log { destination(d_consoleall); flags(catch-all); }; |
118 |
|
119 |
# Extra includes |
120 |
include "/etc/syslog-ng/syslog-ng.d"; |
121 |
|