Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't figure out how to set up stats for HAProxy.

This is my configuration:

    log local0
    log local1 notice
    user haproxy
    group haproxy
    maxconn 4096

    stats socket /tmp/haproxy

    log global
    mode tcp
    option tcplog
    option dontlognull
    option redispatch
    option clitcpka
    option srvtcpka
    option tcpka
    retries 3
    maxconn 2000
    contimeout 10000
    clitimeout 50000
    srvtimeout 50000

    stats enable
    stats hide-version
    stats scope .
    stats realm Haproxy\ Statistics
    stats uri /haproxy?stats
    stats auth xxxxx:xxxxx

    option contstats

listen rtmp :1935
    mode tcp
    balance roundrobin

    server s1 check
    server s2 check

As far as I understand the manual there should be a stats page available via http://mysite/haproxy?stats. What am I missing?

EDIT: I can access the stats with socat but not with a web browser.

share|improve this question
up vote 48 down vote accepted

That is not correct. There would be a stats page on

To overcome this add another listener-

listen stats :1936
    mode http
    stats enable
    stats hide-version
    stats realm Haproxy\ Statistics
    stats uri /
    stats auth Username:Password

Then go to and login.

Make sure your firewall isn't blocking this request.

share|improve this answer
exactly what I needed. kudos! :) – Yuval A Dec 30 '10 at 10:11

In new versions of haproxy (>1.6) you have to set the mode to http instead of tcp (default) to config : 'stats' statement ignored for frontend 'http-in' as it requires HTTP mode.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.