| 1 | @version:3.2 | 
|---|
| 2 |  | 
|---|
| 3 | # syslog-ng configuration file. | 
|---|
| 4 | # | 
|---|
| 5 | # This should behave pretty much like the original syslog on RedHat. But | 
|---|
| 6 | # it could be configured a lot smarter. | 
|---|
| 7 | # | 
|---|
| 8 | # See syslog-ng(8) and syslog-ng.conf(5) for more information. | 
|---|
| 9 | # | 
|---|
| 10 |  | 
|---|
| 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 | create_dirs (no); | 
|---|
| 19 | keep_hostname (yes); | 
|---|
| 20 | }; | 
|---|
| 21 |  | 
|---|
| 22 | source s_sys { | 
|---|
| 23 | file ("/proc/kmsg" program_override("kernel: ")); | 
|---|
| 24 | unix-stream ("/dev/log"); | 
|---|
| 25 | internal(); | 
|---|
| 26 | # udp(ip(0.0.0.0) port(514)); | 
|---|
| 27 | }; | 
|---|
| 28 |  | 
|---|
| 29 | destination d_cons { file("/dev/console"); }; | 
|---|
| 30 | destination d_mesg { file("/var/log/messages"); }; | 
|---|
| 31 | destination d_auth { file("/var/log/secure"); }; | 
|---|
| 32 | destination d_mail { file("/var/log/maillog" flush_lines(10)); }; | 
|---|
| 33 | destination d_spol { file("/var/log/spooler"); }; | 
|---|
| 34 | destination d_boot { file("/var/log/boot.log"); }; | 
|---|
| 35 | destination d_cron { file("/var/log/cron"); }; | 
|---|
| 36 | #destination d_kern { file("/var/log/kern"); }; | 
|---|
| 37 | destination d_mlal { usertty("*"); }; | 
|---|
| 38 |  | 
|---|
| 39 | destination d_zroot { program("/etc/syslog-ng/d_zroot.pl"); }; | 
|---|
| 40 | #destination d_watch { program("/usr/local/libexec/watch-syslog.py"); }; | 
|---|
| 41 |  | 
|---|
| 42 | #filter f_kernel     { facility(kern); }; | 
|---|
| 43 | filter f_default    { level(info..emerg) and | 
|---|
| 44 | not (facility(mail) | 
|---|
| 45 | or facility(authpriv) | 
|---|
| 46 | or facility(cron)); }; | 
|---|
| 47 | filter f_auth       { facility(authpriv); }; | 
|---|
| 48 | filter f_mail       { facility(mail); }; | 
|---|
| 49 | filter f_emergency  { level(emerg); }; | 
|---|
| 50 | filter f_news       { facility(uucp) or | 
|---|
| 51 | (facility(news) | 
|---|
| 52 | and level(crit..emerg)); }; | 
|---|
| 53 | filter f_boot   { facility(local7); }; | 
|---|
| 54 | filter f_cron   { facility(cron); }; | 
|---|
| 55 |  | 
|---|
| 56 | filter f_oom { facility(kern) and (match("Out of memory:") or match("Killed process")); }; | 
|---|
| 57 |  | 
|---|
| 58 | #log { source(s_sys); filter(f_kernel); destination(d_cons); }; | 
|---|
| 59 | #log { source(s_sys); filter(f_kernel); destination(d_kern); }; | 
|---|
| 60 | log { source(s_sys); filter(f_default); destination(d_mesg); }; | 
|---|
| 61 | log { source(s_sys); filter(f_auth); destination(d_auth); }; | 
|---|
| 62 | log { source(s_sys); filter(f_mail); destination(d_mail); }; | 
|---|
| 63 | log { source(s_sys); filter(f_emergency); destination(d_mlal); }; | 
|---|
| 64 | log { source(s_sys); filter(f_news); destination(d_spol); }; | 
|---|
| 65 | log { source(s_sys); filter(f_boot); destination(d_boot); }; | 
|---|
| 66 | log { source(s_sys); filter(f_cron); destination(d_cron); }; | 
|---|
| 67 |  | 
|---|
| 68 | log { source(s_sys); filter(f_auth); destination(d_zroot); }; | 
|---|
| 69 | #log { source(s_sys); filter(f_default); destination(d_watch); }; | 
|---|
| 70 | log { source(s_sys); filter(f_oom); destination(d_zroot); }; | 
|---|
| 71 |  | 
|---|
| 72 | # vim:ft=syslog-ng:ai:si:ts=4:sw=4:et: | 
|---|