[syslog-ng]Fedora Core configuration files

José Pedro Oliveira syslog-ng@lists.balabit.hu
Fri, 25 Feb 2005 22:24:01 +0000


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigD0C72D97ECC462E97FEEB1D5
Content-Type: multipart/mixed;
 boundary="------------050501040309060808050509"

This is a multi-part message in MIME format.
--------------050501040309060808050509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Balazs,

Could you add the four attached files to the contrib directory?
They will be needed by the new specfile.

Regards,
jpo
--
José Pedro Oliveira
* mailto: jpo@di.uminho.pt * http://gsd.di.uminho.pt/~jpo *
* gpg fingerprint = F9B6 8D87 859D 1C94 48F0 84C0 9749 9EB5 91BD 851B *

--------------050501040309060808050509
Content-Type: text/plain;
 name="fedora.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="fedora.conf"

# syslog-ng configuration file.
#
# This should behave pretty much like the original syslog on RedHat. But
# it could be configured a lot smarter.
#
# See syslog-ng(8) and syslog-ng.conf(5) for more information.
#
# 20000925 gb@sysfive.com
#
# Updated by Frank Crawford (<Frank.Crawford@ac3.com.au>) - 10 Aug 2002
# 	- for Red Hat 7.3
#	- totally do away with klogd
#	- add message "kernel:" as is done with klogd.
#
# Updated by Frank Crawford (<Frank.Crawford@ac3.com.au>) - 22 Aug 2002
#	- use the log_prefix option as per Balazs Scheidler's email
#
# Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 05 Apr 2003
#	- corrected filters 'f_filter2' and 'f_filter6'
#     these filters were only allowing messages of one specific
#     priority level; they should be allowing messages from that
#     priority and upper levels.
#
# Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 25 Jan 2005
#   - Don't sync the d_mail destination
#
# Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 01 Feb 2005
#   - /proc/kmsg is a file not a pipe.
#     (https://lists.balabit.hu/pipermail/syslog-ng/2005-February/006963.html)
#

options {
    sync (0);
    time_reopen (10);
    log_fifo_size (1000);
    long_hostnames (off);
    use_dns (no);
    use_fqdn (no);
    create_dirs (no);
    keep_hostname (yes);
};

source s_sys {
    file ("/proc/kmsg" log_prefix("kernel: "));
    unix-stream ("/dev/log");
    internal();
    # udp(ip(0.0.0.0) port(514));
};

destination d_cons { file("/dev/console"); };
destination d_mesg { file("/var/log/messages"); };
destination d_auth { file("/var/log/secure"); };
destination d_mail { file("/var/log/maillog" sync(10)); };
destination d_spol { file("/var/log/spooler"); };
destination d_boot { file("/var/log/boot.log"); };
destination d_cron { file("/var/log/cron"); };
destination d_mlal { usertty("*"); };

#filter f_filter1   { facility(kern); };
filter f_filter2   { level(info..emerg) and
                     not facility(mail,authpriv,cron); };
filter f_filter3   { facility(authpriv); };
filter f_filter4   { facility(mail); };
filter f_filter5   { level(emerg); };
filter f_filter6   { facility(uucp) or
                     (facility(news) and level(crit..emerg)); };
filter f_filter7   { facility(local7); };
filter f_filter8   { facility(cron); };

#log { source(s_sys); filter(f_filter1); destination(d_cons); };
log { source(s_sys); filter(f_filter2); destination(d_mesg); };
log { source(s_sys); filter(f_filter3); destination(d_auth); };
log { source(s_sys); filter(f_filter4); destination(d_mail); };
log { source(s_sys); filter(f_filter5); destination(d_mlal); };
log { source(s_sys); filter(f_filter6); destination(d_spol); };
log { source(s_sys); filter(f_filter7); destination(d_boot); };
log { source(s_sys); filter(f_filter8); destination(d_cron); };

--------------050501040309060808050509
Content-Type: text/plain;
 name="fedora.init"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="fedora.init"

#!/bin/sh
#
# syslog-ng    This starts and stops syslog-ng
#
# chkconfig:   2345 12 88
# description: reads and logs messages to the system console, log \
#              files, other machines and/or users as specified by \
#              its configuration file.
# processname: /sbin/syslog-ng
# config:      /etc/syslog-ng/syslog-ng.conf
# config:      /etc/sysconfig/syslog-ng
# pidfile:     /var/run/syslog-ng.pid
#
### BEGIN INIT INFO
# Provides: $syslog
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

exec="/sbin/syslog-ng"
prog=$(basename $exec)

[ -f $exec ] || exit 0

# Source config
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog

lockfile=/var/lock/subsys/$prog

umask 077

start() {
    echo -n $"Starting $prog: "
    daemon $exec $SYSLOGNG_OPTIONS
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
    echo -n $"Reloading syslog-ng.conf file: "
    killproc $prog -HUP
    retval=$?
    echo
    return $retval
}

force_reload() {
    restart
}

fdr_status() {
    status $prog
}

case "$1" in
    start|stop|restart|reload)
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        fdr_status
        ;;
    condrestart|try-restart)
        [ ! -f $lockfile ] || restart
        ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac

--------------050501040309060808050509
Content-Type: text/plain;
 name="fedora.logrotate"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="fedora.logrotate"

/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
    sharedscripts
    postrotate
	/bin/kill -HUP `cat /var/run/syslog-ng.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

--------------050501040309060808050509
Content-Type: text/plain;
 name="fedora.sysconfig"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="fedora.sysconfig"

#---
# Syslog-ng command line options
# See syslog-ng(8) for more details
#---
SYSLOGNG_OPTIONS=""

--------------050501040309060808050509--

--------------enigD0C72D97ECC462E97FEEB1D5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCH6WFl0metZG9hRsRAsWYAJ9ldf7UE1UHtW5xJjdluiTGmUwYagCfQQ/s
XwMp5b5G+/W67doITY8wB9Q=
=P29d
-----END PGP SIGNATURE-----

--------------enigD0C72D97ECC462E97FEEB1D5--