| [2066] | 1 | @version:3.2 | 
|---|
|  | 2 |  | 
|---|
| [645] | 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 { | 
|---|
| [2066] | 12 | flush_lines (0); | 
|---|
| [1259] | 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); | 
|---|
| [2066] | 20 | stats_freq (0); | 
|---|
| [645] | 21 | }; | 
|---|
|  | 22 |  | 
|---|
|  | 23 | source s_sys { | 
|---|
| [2066] | 24 | file ("/proc/kmsg" program_override("kernel: ")); | 
|---|
| [2100] | 25 | unix-dgram ("/dev/log"); | 
|---|
| [1259] | 26 | internal(); | 
|---|
|  | 27 | # udp(ip(0.0.0.0) port(514)); | 
|---|
| [645] | 28 | }; | 
|---|
|  | 29 |  | 
|---|
|  | 30 | destination d_cons { file("/dev/console"); }; | 
|---|
|  | 31 | destination d_mesg { file("/var/log/messages"); }; | 
|---|
|  | 32 | destination d_auth { file("/var/log/secure"); }; | 
|---|
| [2066] | 33 | destination d_mail { file("/var/log/maillog" flush_lines(10)); }; | 
|---|
| [645] | 34 | destination d_spol { file("/var/log/spooler"); }; | 
|---|
|  | 35 | destination d_boot { file("/var/log/boot.log"); }; | 
|---|
|  | 36 | destination d_cron { file("/var/log/cron"); }; | 
|---|
| [1259] | 37 | #destination d_kern { file("/var/log/kern"); }; | 
|---|
| [645] | 38 | destination d_mlal { usertty("*"); }; | 
|---|
|  | 39 |  | 
|---|
|  | 40 | destination d_zroot { program("/etc/syslog-ng/d_zroot.pl"); }; | 
|---|
| [817] | 41 | #destination d_watch { program("/usr/local/libexec/watch-syslog.py"); }; | 
|---|
| [645] | 42 |  | 
|---|
| [1259] | 43 | #filter f_kernel     { facility(kern); }; | 
|---|
|  | 44 | filter f_default    { level(info..emerg) and | 
|---|
|  | 45 | not (facility(mail) | 
|---|
|  | 46 | or facility(authpriv) | 
|---|
|  | 47 | or facility(cron)); }; | 
|---|
|  | 48 | filter f_auth       { facility(authpriv); }; | 
|---|
|  | 49 | filter f_mail       { facility(mail); }; | 
|---|
|  | 50 | filter f_emergency  { level(emerg); }; | 
|---|
|  | 51 | filter f_news       { facility(uucp) or | 
|---|
|  | 52 | (facility(news) | 
|---|
|  | 53 | and level(crit..emerg)); }; | 
|---|
|  | 54 | filter f_boot   { facility(local7); }; | 
|---|
|  | 55 | filter f_cron   { facility(cron); }; | 
|---|
| [645] | 56 |  | 
|---|
| [817] | 57 | filter f_oom { facility(kern) and (match("Out of memory:") or match("Killed process")); }; | 
|---|
| [645] | 58 |  | 
|---|
| [1259] | 59 | #log { source(s_sys); filter(f_kernel); destination(d_cons); }; | 
|---|
|  | 60 | #log { source(s_sys); filter(f_kernel); destination(d_kern); }; | 
|---|
|  | 61 | log { source(s_sys); filter(f_default); destination(d_mesg); }; | 
|---|
|  | 62 | log { source(s_sys); filter(f_auth); destination(d_auth); }; | 
|---|
|  | 63 | log { source(s_sys); filter(f_mail); destination(d_mail); }; | 
|---|
|  | 64 | log { source(s_sys); filter(f_emergency); destination(d_mlal); }; | 
|---|
|  | 65 | log { source(s_sys); filter(f_news); destination(d_spol); }; | 
|---|
|  | 66 | log { source(s_sys); filter(f_boot); destination(d_boot); }; | 
|---|
|  | 67 | log { source(s_sys); filter(f_cron); destination(d_cron); }; | 
|---|
| [645] | 68 |  | 
|---|
| [1259] | 69 | log { source(s_sys); filter(f_auth); destination(d_zroot); }; | 
|---|
|  | 70 | #log { source(s_sys); filter(f_default); destination(d_watch); }; | 
|---|
| [817] | 71 | log { source(s_sys); filter(f_oom); destination(d_zroot); }; | 
|---|
| [645] | 72 |  | 
|---|
| [1259] | 73 | # vim:ft=syslog-ng:ai:si:ts=4:sw=4:et: | 
|---|