HAProxy community

Stats page not showing Frontends or Backends

Can’t get anything but the [stats] section to show - any ideas what i’m doing wrong config below (tried listen stats at top and bottom does not make a difference):

log fd@2 local2
maxconn 4000
stats socket /var/run/haproxy.cmd
ssl-default-bind-options force-tlsv12 prefer-client-ciphers
ssl-default-bind-ciphers ECDH+AESGCM:ECDH+CHACHA20:ECDH+AES256:ECDH+AES128:!aNULL:!SHA1:!AESCCM
ssl-default-server-options force-tlsv12
ssl-default-server-ciphers ECDH+AESGCM:ECDH+CHACHA20:ECDH+AES256:ECDH+AES128:!aNULL:!SHA1:!AESCCM
tune.ssl.default-dh-param 2048

resolvers docker
nameserver dns1
resolve_retries 3
timeout resolve 1s
timeout retry 1s
hold other 10s
hold refused 10s
hold nx 10s
hold timeout 10s
hold valid 10s
hold obsolete 10s

timeout connect 10s
timeout client 30s
timeout server 30s
log global
mode http
option httplog
option forwardfor if-none

frontend fe_balancer
bind *:80
bind *:443 ssl crt /usr/local/etc/haproxy/certs/wc-something.com.pem
mode http
option forwardfor
http-request set-header Forwarded for=%[src]
use_backend be_bob if { ssl_fc_sni bob.something.com }
use_backend be_george if { ssl_fc_sni george.something.com }

backend be_bob
http-response set-header Strict-Transport-Security “max-age=15552000; includeSubDomains; preload;”
acl caldav-endpoint path_beg /.well-known/caldav
http-request set-path /remote.php/dav if caldav-endpoint

acl carddav-endpoint path_beg /.well-known/carddav
http-request set-path /remote.php/dav if carddav-endpoint

mode http
option forwardfor
balance leastconn
server-template serverprefixname_ 1 server-hostname:80 check resolvers docker init-addr libc,none

backend be_george
mode http
option forwardfor
balance leastconn
server serverprefixname server-hostname2:80 check resolvers docker init-addr libc,none

listen stats
bind *:71 ssl crt /usr/local/etc/haproxy/certs/wc-something.com.pem
mode http
stats enable
stats admin if TRUE
stats scope .
stats realm Haproxy\ Statistics
stats uri /
stats auth admin:password
stats refresh 15s
stats show-legends
stats show-node

That’s because you set stats scope . in your stats frontend. Either remove it or set the scope for the other proxies.

Thx - that’ll teach me to used cobbled together examples!