mesosphere / marathon-lb

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

question about log #339

Open perfe1983 opened 7 years ago

perfe1983 commented 7 years ago

hello

in our infrastracture we use marathon-lb on DC/OS cluster intalled on CoreOS server; we configure docker with the option --log-driver="journald" and then we send journal log using rsyslog to an a remote log collector..

How is the best way to configure haproxy log?

tks

brndnmtthws commented 7 years ago

For the sake of others, there's documentation for this on the wiki: https://github.com/mesosphere/marathon-lb/wiki#enabling-haproxy-logging

mhausenblas commented 7 years ago

@brndnmtthws not so fast please. We were there (see also our discussion on #networking channel). The docs do not explain how to configure MLB in DC/OS. Can you clarify this please? I tried it myself and failed to configure it via dcos package install --options=options.json marathon-lb. To me it looks like this is not implemented in the Universe and there should be an issue for this.

brndnmtthws commented 7 years ago

That's correct, it's not an in the package. The reason for this is that the logs wouldn't go anywhere useful. It requires a few more steps to configure the host logging so that everything sent to /dev/log goes somewhere. I don't think that's within the scope of DC/OS, and it isn't for me to decide either. Furthermore, HAProxy is configured with the logging off by default, because HAProxy's logging isn't very useful most of the time (it's just a lot of noise).

Happy to leave this open though.

mimmus commented 7 years ago

Log is always useful: following calls from a client to a specific container along the full path is an invaluable help

brndnmtthws commented 7 years ago

Certainly, but the haproxy logs don't really tell you much that tcpdump doesn't.

perfe1983 commented 7 years ago

It is true with tcpdump you can trace all network traffic but the log is easier to create alarms and build kpi

lvyc7chinaunicom commented 7 years ago

@brndnmtthws hello, how do you open HAProxy log , and ,how to view the HAProxy log in docker? can you tell me ? thinks!

brndnmtthws commented 7 years ago

@lvyc7chinaunicom I don't work for Mesosphere anymore, but you can hire me as a consultant if you'd like.