Page MenuHomePhabricator

haproxy: install some command line interface
Open, LowPublic

Description

Dealing with the socket interface directly is painful and pointless, given there are a few nice command line interfaces.

Example https://pypi.org/project/haproxy-cli/ :

aborrero@toolsbeta-test-k8s-haproxy-5:~$ haproxy-cli -k /run/haproxy/haproxy.sock -b k8s-api -c servers
Name: FRONTEND Status: OPEN Weight:  bIn: 508877 bOut: 6801416
Name: toolsbeta-test-k8s-control-7.toolsbeta.eqiad1.wikimedia.cloud Status: UP Weight: 100 bIn: 145098 bOut: 1992708
Name: toolsbeta-test-k8s-control-8.toolsbeta.eqiad1.wikimedia.cloud Status: UP Weight: 100 bIn: 141309 bOut: 1919985
Name: toolsbeta-test-k8s-control-9.toolsbeta.eqiad1.wikimedia.cloud Status: UP Weight: 100 bIn: 222470 bOut: 2888723

Event Timeline

fwiw, I tend to just port-forward the stats interface on port 9900 (or 8404 in some cases) to my laptop.