For what it's worth, I've implemented a basic script in PHP (please don't yell at me for using PHP) that sucks in the info from the haproxy socket and then executes commands to the XenServer hosts using the XenAPI (XAPI). It works decently well - I have the script running every 5 minutes, which seems to be okay so far for the demand on these systems. It seems to be an okay balance between boot time of the systems and people connecting to the systems.
I will say it would still be better to have something trigger-based rather than polling. I even looked into trying to use iptables on Linux to trigger something upon connection to a certain port, but iptables doesn't quite have the right functionality to do it. In any case, the periodic script will suffice for now, and I'm sure I'll change and improve upon it a bit. For the time being it has been able to manage my overall usage of physical resources a little more efficiently as it can spin down VMs when they aren't being used, which frees those resources for other systems and cuts the overall heat generation and power consumption. -Nick From: "Ben Timby" <bti...@gmail.com> To: "Nick E Couchman" <nick.couch...@seakr.com> Cc: haproxy@formilux.org Sent: Monday, May 11, 2015 11:35:03 AM Subject: Re: VM Power Control/Elasticity Nick, Here is some information on using socat to interact with the stats socket. This might be useful for shell scripting. http://www.mgoff.in/2010/07/14/haproxy-gathering-stats-using-socat/