In order to enable logging for HaProxy, edit
/etc/sysconfig/rsyslog file and make the single line in it to match the following:
SYSLOGD_OPTIONS="-c 2 -r"
As a matter of fact the “-r” key should be added to the options of the
rsyslog daemon in order to make it accept events on the ip socket.
Next edit the
1. Uncomment the following lines:
# Provides UDP syslog reception $ModLoad imudp $UDPServerRun 514
# Provides TCP syslog reception $ModLoad imtcp $InputTCPServerRun 514
2. Now we need to create the corresponding logfacility. If the
global section of your
haproxy.cfg has the following
log 127.0.0.1 local2
rsyslog.conf with the following line:
rsyslog to apply the changes: