Skip to content

Instantly share code, notes, and snippets.

@terrycojones
Created March 27, 2013 11:07
Show Gist options
  • Save terrycojones/5253419 to your computer and use it in GitHub Desktop.
Save terrycojones/5253419 to your computer and use it in GitHub Desktop.
haproxy logging conf (/etc/rsyslog.d/49-haproxy.conf)
# This file added by Terry on Dec 3, 2012
# See http://kvz.io/blog/2010/08/11/haproxy-logging/
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514
local1.* -/var/log/haproxy_1.log
& ~
# & ~ means not to put what matched in the above line anywhere else for the rest of the rules
# http://serverfault.com/questions/214312/how-to-keep-haproxy-log-messages-out-of-var-log-syslog
@terrycojones
Copy link
Author

I also needed

global
    log 127.0.0.1 local1 info

defaults
    log global

in /etc/haproxy/haproxy.cfg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment