[rsyslog-notify] Forum Thread: RainerScript, Expressions und Remote Logging - (Mode 'post')

noreply at adiscon.com noreply at adiscon.com
Tue Jan 20 17:05:37 CET 2015


User: RSchulz 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=25175#p25175

Message: 
----------
Hallo!

Ich muss unsere bisherige syslog Konfig von syslog-ng auf rsyslog
übertragen, daher fehlt mir noch die Erfahrung mit rsyslog, ich hoffe Ihr
könnt mir dabei helfen.

Ich muss einen grossteil aller syslog Meldungen auf einen zentralen Syslog 
Server schicken, bestimmte Meldungen dürfen wiederrum nicht dorthin
geschickt werden.
Der rsyslog ist ein 5.8.11 auf Debian 7.
Die /etc/rsyslog.conf enthält ein [code:9p81vzwh]$IncludeConfig
/etc/rsyslog.d/*.conf[/code:9p81vzwh]
Darin habe ich, unteranderem, folgendes erstellt:

[code:9p81vzwh]
if not ( \
        # f_sudolog
        #  wird oben schon aus der Verarbeitung entfernt.

        # f_mailinfo
        ( $syslogfacility-text == 'mail' and $syslogseverity-text == 'info'
) or \

        # f_newsnotice
        ( $syslogfacility-text == 'news' and  ( $syslogseverity-text ==
'info' or $syslogseverity-text == 'notice' )) or \

        # f_local
        (       $syslogfacility-text == 'local0' or \
                $syslogfacility-text == 'local1' or \
                $syslogfacility-text == 'local2' or \
                $syslogfacility-text == 'local3' or \
                $syslogfacility-text == 'local4' or \
                $syslogfacility-text == 'local5' or \
                $syslogfacility-text == 'local6' or \
                $syslogfacility-text == 'local7' \
        ) or \

        # f_acpid_
        ( $syslogfacility-text == 'daemon' and  ( $msg contains_i 'acpid'
or $programname 'snmpd' )) or \

        # f_netmgm, bei RedHat auf Korrektheit pruefen (RS)
        ( $msg contains_i 'NetworkManager:' )\


        # f_iptables_accept
        # wird nicht benoetigt, da Shorewall "ACCEPT" nicht loggt, siehe
policy, (RS)

) then @195.xxx.xxx.5
& /var/log/logserver
[/code:9p81vzwh]

Leider wird die Action "@..." als Syntax Fehler eingestuft, mit einer Datei
geht es.

Wie mache ich das richtig? ;-)

Vielen Dank für die Hilfe
Reiner


More information about the rsyslog-notify mailing list