Collect haproxy logs via syslog
Haproxy wants to log to syslog (and not stdout for performance reasons, see https://github.com/dockerfile/haproxy/issues/3). However there is no running syslog in our haproxy container. What we can do is mount in the host's /dev/log and have haproxy write to the hosts syslog to get logging. Do this via a docker compose volume bind mount. Change-Id: Icf4a91c2bc5f5dbb0bfb9d36e7ec0210c6dc4e90
This commit is contained in:
parent
cb86492fa4
commit
d80f4a93ab
@ -8,6 +8,7 @@ services:
|
||||
image: haproxy:latest
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /dev/log:/dev/log
|
||||
- /var/haproxy/etc:/usr/local/etc/haproxy
|
||||
- /var/haproxy/run:/var/haproxy/run
|
||||
haproxy-statsd:
|
||||
|
@ -1,7 +1,7 @@
|
||||
global
|
||||
uid 1000
|
||||
gid 1000
|
||||
log 127.0.0.1 local0
|
||||
log /dev/log local0
|
||||
maxconn 4000
|
||||
pidfile /var/haproxy/run/haproxy.pid
|
||||
stats socket /var/haproxy/run/stats uid 1000 gid 1000 mode 0600 level admin
|
||||
|
Loading…
Reference in New Issue
Block a user