haproxy only logs to /dev/log; this means all our access logs get mixed into syslog. This makes it impossible to pick out anything in syslog that might be interesting (and vice-versa, means you have to filter out things if analysing just the haproxy logs). It seems like the standard way to deal with this is to have rsyslogd listen on a separate socket, and then point haproxy to that. So this configures rsyslogd to create /var/run/dev/log and maps that into the container as /dev/log (i.e. don't have to reconfigure the container at all). We then capture this sockets logs to /var/log/haproxy.log, and install rotation for it. Additionally we collect this log from our tests. Change-Id: I32948793df7fd9b990c948730349b24361a8f307changes/16/845316/5
parent
8a90e1af9a
commit
f97b9b8b8b
@ -0,0 +1,8 @@
|
||||
# Create additional haproxy socket to be mapped into container
|
||||
|
||||
$AddUnixListenSocket /var/haproxy/dev/log
|
||||
|
||||
:programname, startswith, "haproxy" {
|
||||
/var/log/haproxy.log
|
||||
stop
|
||||
}
|
Loading…
Reference in new issue