docker-flow / docker-flow-proxy

Docker Flow Proxy
https://docker-flow.github.io/docker-flow-proxy/
MIT License
317 stars 189 forks source link

Logging configuration #73

Closed remy-tiitre closed 5 years ago

remy-tiitre commented 5 years ago

When I want to use HAProxys native syslog logging facility how should I configure it in docker-flow-proxy. Use templates? Frontend and Global extra blocks? I understand that from syslog perspective I either have to use remote IP or map /dev/log from host into container.

thomasjpfan commented 5 years ago

From my understanding docker-flow-proxy already watches the syslogs from haproxy, what issue are you running into when trying to use HAProxys native syslog?

remy-tiitre commented 5 years ago

I want it to log directly to my syslog server and not to a console. It has been correctly noted that DEBUG=true should not be used in production. I don't need logs for debugging purposes but for auditing purposes. It would be foolish to redirect HAProxy logs to docker console and then use docker syslog logging driver.

thomasjpfan commented 5 years ago

I am not familiar with how to send haproxy logs to an external syslog server. Do you have any guidance on this matter?

remy-tiitre commented 5 years ago

Well, best place is probably HAProxy manual. But it's not that complicated. What I would add is: global log host.docker.internal:514 local0 defaults log global option httplog option dontlognull

What I was wondering is how people are doing it already right now in production. I do hope its not with DEBUG=true switch as that would be most ineffective. Logs would go from HAProxy -> syslog -> (file -> docker console) -> docker logging driver (syslog). Kind of pointless when you can send logs directly to syslog.

thomasjpfan commented 5 years ago

DFP supports adding additional config options by setting EXTRA_GLOBAL=log host.docker.internal:514 local0 and EXTRA_FRONTEND=log global,option httplog,option dontlognull.

remy-tiitre commented 5 years ago

Can be closed. That was my original question if this should be done with EXTRA_* variables.