Vladimír Houba ml. <[email protected]> writes:

Hello,

> we have many backends with few permanent connections/each and I was
> wondering if it is possible to send an email alert when no connection is
> active on the backend. It is not possible to implement this feature on the
> application server as they are load-balanced and the connection may be
> routed to any of them.
>
> Also, it would be nice feature to be able to send the notifications via a
> rest service to make it more flexible.

This sounds like the sort of thing a monitoring system does. Fortunately
HAProxy already offers a nice hook for this class of tools:
http://cbonte.github.io/haproxy-dconv/1.8/management.html#9

Basically, fetch the stats, parse the CSV format and extract the
per-server/backend "current sessions" field, trigger an alert if the
value is below a certain threshold.

HTH,
Marc

Reply via email to