Re: logging & stats

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 10 Jul 2008 01:27:09 +0200


Hi,

On Wed, Jul 09, 2008 at 03:25:11PM -0700, Konstantin Svist wrote:
> Hi,
>
> I'm trying to get logging (I want a log entry for every http query) and
> stats to work. Neither one works right now.
>
>
> I've configured haproxy as follows:
> ---------------------------------------------
> global
> maxconn 4096 # Total Max Connections. This is dependent on
> ulimit
> daemon
> nbproc 2 # Number of processing cores. Dual Dual-core
> Opteron is 4 cores for example.
> log 127.0.0.1 local1
>
> defaults
> mode http
> clitimeout 60000
> srvtimeout 30000
> contimeout 4000
> # option httpclose # Disable Keepalive
> log global
> option httplog
>
> listen http_proxy :7080
> balance roundrobin # Load Balancing algorithm
> # option httpchk
> # option forwardfor # This sets X-Forwarded-For
> ## Define your servers to balance
> server srv1 srv1:8080 weight 1 maxconn 512 check
> server srv2 srv2:8080 weight 1 maxconn 512 check
> server srv3 srv3:8080 weight 1 maxconn 512 check
> stats enable
> stats auth foo:bar
> mode http
> ---------------------------------------------

For the logs, I suspect that your syslog server is not setup to listen to the UDP port (514). With syslogd from sysklogd package, you need to pass it the "-r" option.

For the stats, it is because you have disabled "option httpclose".

Regards,
Willy Received on 2008/07/10 01:27

This archive was generated by hypermail 2.2.0 : 2008/07/10 01:30 CEST