How do I see the state of HAProxy?


#1

How do I find out which nodes HAProxy thinks are available for each resource? For instance, I have a three node Galera cluster behind HAProxy. I’d like to know which nodes HAProxy is willing to send traffic to, and which nodes HAProxy believes are unavailable.

I’m surprised that I wasn’t able to find this information with a quick Google search; perhaps I’m understanding something wrong?


#2

Hi Nogginboink -

There are a lot of ways to get this information. HAProxy will log the state of backend servers as they come up and down, so that’s one way. There’s also a stats socket which can be queried to get information: http://www.haproxy.org/download/1.6/doc/management.txt - and, you can use a program like hatop to query it interactively.

Additionally, there’s an HTTP stats frontend that you might find interesting: http://tecadmin.net/how-to-configure-haproxy-statics/

best of luck!

  • Andrew