I am running Ubuntu 14.04 and I am wondering how I can log everything that happens in HAProxy. I've been reading issues concerning logging and chroot. Everything is telling me to do write different things in different files.
/var/log# ls
alternatives.log apt bootstrap.log btmp dmesg dpkg.log faillog fsck lastlog upstart wtmp
/etc/rsyslog.d# ls
49-haproxy.conf 50-default.conf
My /etc/haproxy/haproxy.cfg
file contains this:
global
log 127.0.0.1 local0
maxconn 2048
tune.ssl.default-dh-param 2048
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
defaults
log global
mode http
option httplog
option dontlognull
retries 3
timeout connect 5000
timeout client 10000
timeout server 10000
I can't seem to see any logs anywhere!
/dev/log
did not exist. The socket was located at/var/lib/haproxy/dev/log
.49-haproxy.conf
file:Then simple kill and start:
Make sure to have set the socket with the right owner: