Enable Ha-Proxy stats page

To enable status page in your ha-proxy loadbalancer, add the following ingo the /etc/haproxy/haproxy.cfg file:

listen stats :9000  # Listen on localhost:9000
  mode http
  stats enable  # Enable stats page
  stats hide-version  # Hide HAProxy version
  stats realm Haproxy\ Statistics  # Title text for popup window
  stats uri /haproxy_stats  # Stats URI
  stats auth admin:admin  # Authentication credentials

Next you’ll see this pretty picture when accessing the 9000’th port of your server:

Share Button

Leave a Reply