mesosphere / marathon-lb

Marathon-lb is a service discovery & load balancing tool for DC/OS
Apache License 2.0
449 stars 302 forks source link

Haproxy Logging #557

Open alanhughes opened 6 years ago

alanhughes commented 6 years ago

Hi marathon-lb

We're getting some intermittent 503s with a few of our services and trying to determine whether marathon-lb is the cause. We've add 'option httplog' as a backend option to an affected service and followed the guidance around mounting /dev/log inside our marathon-lb container, but annoyingly the only logs we're seeing when hitting the service via marathon-lb are below:

Mar  1 17:28:21 ip-10-0-10-138 haproxy[14811]: Connect from 192.168.30.144:61618 to 10.0.10.138:80 (marathon_http_in/HTTP)
Mar  1 17:28:21 ip-10-0-10-138 haproxy[14811]: Connect from 192.168.30.144:61617 to 10.0.10.138:80 (marathon_http_in/HTTP)

Is there some option we can turn on that will log a little more verbosely? Ideally we'd like something akin to what is described in the haproxy documentation here - response codes, paths hit etc.

Hope you can help!

Many thanks

Alan

pramodhkp commented 6 years ago

@alanhughes You'll need to enable option httplog or option tcplog, based on your service, in your frontend and backend templates.

https://github.com/mesosphere/marathon-lb/blob/master/Longhelp.md - This has a list of most of the templates you can use.

dispalt commented 4 years ago

@alanhughes I had to enable httplog globally to get it to work, and I think it's because it goes through the frontend marathon_http_in anyways I don't fully understand it