source: trunk/server/fedora/config/etc/syslog-ng/syslog-ng.conf

Last change on this file was 2100, checked in by mitchb, 13 years ago
Fix syslog-ng/systemd interaction, or "socket to me!" systemd creates and passes datagram sockets to daemons (at least by default). Fedora's default configuration for syslog-ng expected the socket passed in to be a stream socket (and we slurped that in forever ago). When syslog-ng sees that the socket it received isn't of the type it expected, instead of either coping or barfing, it just opens a new /dev/log socket of the type it wants, which is just hunky-dory for programs that connect after it disowns systemd's socket, but for anything that already connected to the datagram socket from systemd, they're logging to a useless socket that systemd isn't poll()ing, and thus can block (and, depending on what programs end up in this situation, potentially wedge your entire system). So, uh... let's not do that anymore. Fedora's also changing their default config. See RHBZ #742624
File size: 2.5 KB
RevLine 
[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
11options {
[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
23source 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
30destination d_cons { file("/dev/console"); };
31destination d_mesg { file("/var/log/messages"); };
32destination d_auth { file("/var/log/secure"); };
[2066]33destination d_mail { file("/var/log/maillog" flush_lines(10)); };
[645]34destination d_spol { file("/var/log/spooler"); };
35destination d_boot { file("/var/log/boot.log"); };
36destination d_cron { file("/var/log/cron"); };
[1259]37#destination d_kern { file("/var/log/kern"); };
[645]38destination d_mlal { usertty("*"); };
39
40destination 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); };
44filter f_default    { level(info..emerg) and
45                        not (facility(mail)
46                        or facility(authpriv)
47                        or facility(cron)); };
48filter f_auth       { facility(authpriv); };
49filter f_mail       { facility(mail); };
50filter f_emergency  { level(emerg); };
51filter f_news       { facility(uucp) or
52                        (facility(news)
53                        and level(crit..emerg)); };
54filter f_boot   { facility(local7); };
55filter f_cron   { facility(cron); };
[645]56
[817]57filter 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); };
61log { source(s_sys); filter(f_default); destination(d_mesg); };
62log { source(s_sys); filter(f_auth); destination(d_auth); };
63log { source(s_sys); filter(f_mail); destination(d_mail); };
64log { source(s_sys); filter(f_emergency); destination(d_mlal); };
65log { source(s_sys); filter(f_news); destination(d_spol); };
66log { source(s_sys); filter(f_boot); destination(d_boot); };
67log { source(s_sys); filter(f_cron); destination(d_cron); };
[645]68
[1259]69log { source(s_sys); filter(f_auth); destination(d_zroot); };
70#log { source(s_sys); filter(f_default); destination(d_watch); };
[817]71log { source(s_sys); filter(f_oom); destination(d_zroot); };
[645]72
[1259]73# vim:ft=syslog-ng:ai:si:ts=4:sw=4:et:
Note: See TracBrowser for help on using the repository browser.