How to keep haproxy log messages out of /var/log/syslog
        Posted  
        
            by 
                itsadok
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by itsadok
        
        
        
        Published on 2010-12-20T06:49:41Z
        Indexed on 
            2010/12/21
            13:55 UTC
        
        
        Read the original article
        Hit count: 450
        
I set up haproxy logging via rsyslogd using the tips from this article, and everything seems to be working fine. The log files get the log messages.
However, every log message from haproxy also shows up at /var/log/syslog. This means that once the server goes live, the syslog will be quite useless, as it will be run over with haproxy log messages.
I would like to filter out those messages from /var/log/syslog. After going over the rsyslogd documentation, I tried to change the file /etc/rsyslog.d/50-default.conf thus:
*.*;auth,authpriv.none;haproxy.none     -/var/log/syslog
I simply added the ;haproxy.nonepart. After restarting rsyslogd it stopped working completely until I reverted my changes.
What am I doing wrong?
© Server Fault or respective owner