On Mon, May 11, 2015 at 3:47 PM, Nick Couchman <nick.couch...@seakr.com>
wrote:

> Thanks for the hints, Ben.  I'll defer to those who are experts about
> whether or not something like that should be part of the core
> functionality; however, it seems that even though this case might not be a
> great one for adding that to the core, there are a multitude of reasons why
> you'd want some sort of trigger mechanism on events within HAProxy.  I
> think people have asked here before about e-mail notifications for downed
> hosts, and I can think of a few other cases outside of mine corner case
> that would seem to warrant some generic trigger mechanism within HAProxy.
> Seems if a generic one is implemented the flexibility is there for everyone
> who needs a trigger of some sort or another to use it for whatever purposes
> suite their needs.
>

Especially for down host notification, there are tools to do that, like
Nagios for one. Even a tool like Nagios can run a command (like a simple
shell script to read stats from HAProxy) and then conditionally run another
command (like one that starts some VMs).

You may find there is another tool even better suited to your needs that
already exists. The shell scripting required may be minimal to get the
needed metrics into the tool and run hypervisor commands to control your
VMs. This may even be a tool related more closely to your hypervisor, the
software that manages your VMs. It may be able to run a shell script and
use the exit code to provision more/less machines of a certain class. Then
all you need a script to read stats and produce an exit code.

Reply via email to