Haproxy

From UVOO Tech Wiki
Revision as of 23:58, 22 March 2020 by Busk (talk | contribs)
Jump to navigation Jump to search

``` frontend stats

   bind *:8404
   stats enable
   # stats uri /stats
   stats uri /stats
   stats refresh 10s
   mode http
   stats auth admin:admin
   # stats admin if LOCALHOST
   # acl network_allowed src 10.x.x.x 1.1.1.1 2.2.2.2 10.0.0.0/8
   # stats admin if network_allowed

from haproxystats import HAProxyServer haproxy = HAProxyServer('10.64.4.51:8404/stats')

for b in haproxy.backends:

   print('%s: %s' % (b.name, b.status))