You are running the load balancer in TCP mode and not http mode.
Thats OK, but you need to set up a section for it the config for http mode.
Try adding this to your haproxy.cfg (replace 192.168.123.1 with your
servers IP address):
# LOCAL HAProxy stats #
listen stats 192.168.123.1:80
mode http
log global
maxconn 10
clitimeout 10s
srvtimeout 10s
contimeout 10s
timeout queue 10s
#Stats page eg http://192.168.123.1:80/haproxy?stats
stats enable
stats refresh 30s
stats show-node
stats show-legends
stats show-desc
stats auth letme:in
stats uri /haproxy?stats
Regards,
Duncan
On 11/08/2010 8:57 PM, [email protected] wrote:
Hi,
I can't figure out how to set up stats for HAProxy.
This is my configuration:
|global
log127.0.0.1 local0
log127.0.0.1 local1 notice
daemon
#debug
user haproxy
group haproxy
maxconn4096
stats socket/tmp/haproxy
defaults
logglobal
mode tcp
option tcplog
option dontlognull
option redispatch
retries3
maxconn2000
contimeout10000
clitimeout50000
srvtimeout50000
stats enable
stats hide-version
stats scope.
stats realmHaproxy\ Statistics
stats uri/haproxy?stats
stats auth xxxxx:xxxxx
option contstats
listen rtmp:1935
mode tcp
balance roundrobin
server s1 xxx.xxx.xxx.xxx:1935 check
server s2 xxx.xxx.xxx.xxx:1935 check
|
I can access the stats with socat but *not* with a web browser. As far
as I understand the manual there should be a stats page available via
http://mysite/haproxy?stats. What am I missing?
Regards
Jan