2

We have two HAProxy servers using keapalived for failover. Once one goes down, the other one takes over seamlessly.

I know it is possible to configure HAProxy to send an email to alert a sysadmin, but it would also be helpful to see the health n the HAProxy statistics page where all monitored services are displayed. (hostname:1936/?stats).

Is this possible? Currently we don't even know which one of the servers is serving the stats page.

womble
  • 95,029
  • 29
  • 173
  • 228
merlin
  • 2,033
  • 11
  • 37
  • 72

1 Answers1

1

If all you want to know is which node is the active one, then look at using the stats show-node directive.

Add it to your stats section and you're good to go.

GregL
  • 9,030
  • 2
  • 24
  • 35
  • Thank you that was helpful. Now I know which node the stats are served from. However, it does not tell if the other HAProxy server is up or not. – merlin Aug 21 '15 at 16:15
  • Not sure, but that's a whole other question. – GregL Aug 21 '15 at 16:36
  • [This](http://serverfault.com/q/560024/266218) question might help you along with your *Is the other HAProxy server is up or not?* problem. – GregL Aug 21 '15 at 17:00