Re: haproxy and stats not working :(

From: Guillaume Bourque <guillaume.bourque#gmail.com>
Date: Mon, 17 Mar 2008 19:10:41 -0400


Hello Willy

Thanks fot the quick response. see my comments in the email

 Willy Tarreau a écrit :

Hi Guillaume,

On Mon, Mar 17, 2008 at 01:52:03PM -0400, Guillaume Bourque wrote:

 ...

listen stats 192.168.4.24:80

       mode http
       option httpclose
       stats enable
       stats uri /

 Here, you need to add "balance", because a listen entry cannot have no server. In the past (v1.0 days, when "balance" did not exist), the common behaviour was to have static servers only, which is still the default case. You had to enter a "dispatch" address, which is still supported and which should go away IMHO. Since you have none of them, haproxy complains. A trick is already there to accept "balance" with no server specifically to handle this case :-)

 It work like a charm !
Someone should add this to the doc so someone else won't have to ask ;-)

listen stats 192.168.4.24:80

       mode http
       option httpclose
       stats enable
       stats uri /

            # those 2 lines are require for now but not use
            balance source
            server stat-server 192.168.4.30:80



2) Is there a shell example that I could used to ask haproxy to dump the csv stat to a file ? I have configure the "stats socket /tmp/stats" option but don't know how to get the data ouf of it ?

 we're using "socat" for this :

# echo "show stat" | socat unix-connect:/tmp/stats stdio
# echo "show info" | socat unix-connect:/tmp/stats stdio

It works like a charm. If you don't have it though, I don't know how you could connect there (unless you're willing to write your own tools).

   It works fine ( apt-get install socat on ubuntu )

Someone should included this too in the doc as a example for people who don't play often with socket

Thanks !

Guillaume

Regards,
Willy

-- 
Guillaume Bourque, B.Sc.,
consultant, infrastructures technologiques
Logisoft Technologies inc.
514 576-7638
http://www.logisoftech.com
Received on 2008/03/18 00:10

This archive was generated by hypermail 2.2.0 : 2008/03/18 00:15 CET