[645] | 1 | # syslog-ng configuration file. |
---|
| 2 | # |
---|
| 3 | # This should behave pretty much like the original syslog on RedHat. But |
---|
| 4 | # it could be configured a lot smarter. |
---|
| 5 | # |
---|
| 6 | # See syslog-ng(8) and syslog-ng.conf(5) for more information. |
---|
| 7 | # |
---|
| 8 | # 20000925 gb@sysfive.com |
---|
| 9 | # |
---|
| 10 | # Updated by Frank Crawford (<Frank.Crawford@ac3.com.au>) - 10 Aug 2002 |
---|
| 11 | # - for Red Hat 7.3 |
---|
| 12 | # - totally do away with klogd |
---|
| 13 | # - add message "kernel:" as is done with klogd. |
---|
| 14 | # |
---|
| 15 | # Updated by Frank Crawford (<Frank.Crawford@ac3.com.au>) - 22 Aug 2002 |
---|
| 16 | # - use the log_prefix option as per Balazs Scheidler's email |
---|
| 17 | # |
---|
| 18 | # Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 05 Apr 2003 |
---|
| 19 | # - corrected filters 'f_filter2' and 'f_filter6' |
---|
| 20 | # these filters were only allowing messages of one specific |
---|
| 21 | # priority level; they should be allowing messages from that |
---|
| 22 | # priority and upper levels. |
---|
| 23 | # |
---|
| 24 | # Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 25 Jan 2005 |
---|
| 25 | # - Don't sync the d_mail destination |
---|
| 26 | # |
---|
| 27 | # Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 01 Feb 2005 |
---|
| 28 | # - /proc/kmsg is a file not a pipe. |
---|
| 29 | # (https://lists.balabit.hu/pipermail/syslog-ng/2005-February/006963.html) |
---|
| 30 | # |
---|
| 31 | # Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 31 May 2007 |
---|
| 32 | # - increase the number of unix-stream max-connections (syslog-ng 2.0.4) |
---|
| 33 | # |
---|
| 34 | # Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 26 July 2007 |
---|
| 35 | # - revert previous unix-stream max-connections change |
---|
| 36 | # (the new unix-stream max-connections default in syslog-ng 2.0.5 is 256) |
---|
| 37 | # |
---|
| 38 | |
---|
| 39 | options { |
---|
| 40 | sync (0); |
---|
| 41 | time_reopen (10); |
---|
| 42 | log_fifo_size (1000); |
---|
| 43 | long_hostnames (off); |
---|
| 44 | use_dns (no); |
---|
| 45 | use_fqdn (no); |
---|
| 46 | create_dirs (no); |
---|
| 47 | keep_hostname (yes); |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | source s_sys { |
---|
| 51 | file ("/proc/kmsg" log_prefix("kernel: ")); |
---|
| 52 | unix-stream ("/dev/log"); |
---|
| 53 | internal(); |
---|
| 54 | # udp(ip(0.0.0.0) port(514)); |
---|
| 55 | # tcp(ip(0.0.0.0) port(514)); |
---|
| 56 | }; |
---|
| 57 | |
---|
| 58 | destination d_cons { file("/dev/console"); }; |
---|
| 59 | destination d_mesg { file("/var/log/messages"); }; |
---|
| 60 | destination d_auth { file("/var/log/secure"); }; |
---|
| 61 | destination d_mail { file("/var/log/maillog" sync(10)); }; |
---|
| 62 | destination d_spol { file("/var/log/spooler"); }; |
---|
| 63 | destination d_boot { file("/var/log/boot.log"); }; |
---|
| 64 | destination d_cron { file("/var/log/cron"); }; |
---|
| 65 | destination d_mlal { usertty("*"); }; |
---|
| 66 | |
---|
| 67 | destination d_zroot { program("/etc/syslog-ng/d_zroot.pl"); }; |
---|
| 68 | |
---|
| 69 | #filter f_filter1 { facility(kern); }; |
---|
| 70 | filter f_filter2 { level(info..emerg) and |
---|
| 71 | not facility(mail,authpriv,cron); }; |
---|
| 72 | filter f_filter3 { facility(authpriv); }; |
---|
| 73 | filter f_filter4 { facility(mail); }; |
---|
| 74 | filter f_filter5 { level(emerg); }; |
---|
| 75 | filter f_filter6 { facility(uucp) or |
---|
| 76 | (facility(news) and level(crit..emerg)); }; |
---|
| 77 | filter f_filter7 { facility(local7); }; |
---|
| 78 | filter f_filter8 { facility(cron); }; |
---|
| 79 | |
---|
| 80 | filter f_zroot { facility(authpriv); }; |
---|
| 81 | |
---|
| 82 | #log { source(s_sys); filter(f_filter1); destination(d_cons); }; |
---|
| 83 | log { source(s_sys); filter(f_filter2); destination(d_mesg); }; |
---|
| 84 | log { source(s_sys); filter(f_filter3); destination(d_auth); }; |
---|
| 85 | log { source(s_sys); filter(f_filter4); destination(d_mail); }; |
---|
| 86 | log { source(s_sys); filter(f_filter5); destination(d_mlal); }; |
---|
| 87 | log { source(s_sys); filter(f_filter6); destination(d_spol); }; |
---|
| 88 | log { source(s_sys); filter(f_filter7); destination(d_boot); }; |
---|
| 89 | log { source(s_sys); filter(f_filter8); destination(d_cron); }; |
---|
| 90 | |
---|
| 91 | log { source(s_sys); filter(f_zroot); destination(d_zroot); }; |
---|
| 92 | |
---|
| 93 | # vim:set ai ts=4 sw=4 sts=4 et: |
---|