Re: Logging Connections

From: Matthew Pettis <matthew.pettis#gmail.com>
Date: Mon, 27 Oct 2008 12:36:50 -0500


Hi Alexander,

I changed my haproxy.cfg file to be the following, and send some requests on port 81. The proxy worked fine, but haproxy did not log anything to /var/log/haproxy.log, which is where I set local0 to log to in the syslog.cfg config file. I can write to the file with:

logger -p local0.debug Mymessage

But nothing shows up

----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+ global

    daemon
    quiet
    nbproc 2
    pidfile /var/run/haproxy-private.pid

defaults

    log xxx.xxx.xxx.xxx local0 debug     mode http
    option httplog
    option dontlognull
    retries 3
    redispatch
    maxconn 2000
    contimeout 5000
    clitimeout 50000
    srvtimeout 50000

listen http_proxy_gisvote :81

    balance roundrobin
    server aws_1 xxx.xxx.xxx.xxx:80
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+

Here's the line I added to syslog.conf:

----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+
local0.*                        -/var/log/haproxy.log
----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+----+

Any further advice?

On Mon, Oct 27, 2008 at 10:30 AM, Alexander Staubo <alex#bengler.no> wrote:
>
> On Mon, Oct 27, 2008 at 5:01 AM, Matthew Pettis
> <matthew.pettis#gmail.com> wrote:
> > I'm trying to write a log of connections to haproxy much like the
access.log
> > for apache2. I tried configuring haproxy to write out connections with
the
> > statement:
> >
> > defaults
> > log 209.20.85.148 local0 info
>
> The "info" level only logs information about backends going up and
> down and so on. For HAProxy to log per-request messages you need to
> use the "debug" level. The information HAProxy logs is much more
> detailed than an Apache log, btw; and since the format is different
> you will need to parse it yourself.
>
> Alexander.

--
It is from the wellspring of our despair and the places that we are broken
that we come to repair the world.
-- Murray Waas
Received on 2008/10/27 18:36

This archive was generated by hypermail 2.2.0 : 2008/10/27 18:45 CET