Does Haproxy
log every time a connection is made? I have followed instructions from other threads to set up logging via rsyslogd
. Even though the files are created (haproxy.log,haproxy-info.log and haproxy-allbutinfo.log), no logs have been written into any of them.
I have checked the lfg.log, and these may shed some light on the problem:
Sep 12 22:50:44 : *Suspicious Process* PID:17551 PPID:17551 User:haproxy Uptime:62 secs EXE:/usr/sbin/haproxy CMD:/usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
Sep 12 22:50:44 : *Suspicious Process* PID:17552 PPID:17552 User:haproxy Uptime:62 secs EXE:/usr/sbin/haproxy CMD:/usr/sbin/haproxy -D -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
The RESTRICT_SYSLOG
is set to 3 in csf config. I have also added haproxy
as an allowed user for rsyslogd in /etc/csf/csf.syslogusers
but still no logs have been written. Can anyone tell me what is wrong with the following setup?
csf config
RESTRICT_SYSLOG = "3"
# Allow incoming UDP ports
UDP_IN = "20,21,53,514"
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,53,514"
/etc/haproxy/haproxy.cfg
global
log 127.0.0.1 local2
maxconn 2048
user haproxy
group haproxy
/etc/rsyslog.d/haproxy.conf
$ModLoad imudp
$UDPServerAddress 127.0.0.1
$UDPServerRun 514
local2.* /var/log/haproxy.log
local2.=info /var/log/haproxy-info.log
local2.notice /var/log/haproxy-allbutinfo.log
"haproxy" user added to /etc/csf/csf.syslogusers
# Other users:
haproxy
Updated: I just disabled csf and tried again. Still haproxy doesn't write anything into the files.