monitoring-nagios-haproxy
monitoring-nagios-haproxy copied to clipboard
how to model a "at least one" check
Hi,
the script works fine to monitor that all servers behind a backend are UP. but what if i want only to check that AT LEAST one server is UP?
HAproxy provides already this check, since the backend status is UP if at least on of the server in its group is UP, and becomes DOWN if this is not the case.
How can this perl script be adapted / configured to achieve this check?
is it also possible to whitelist / blacklist certain backends only in/from the check?
I think this would require additional logic and a configuration option, either to query the check and report 1/0 based on the overall state of the backend (and hence discard everything else), or it would need, for allowing or blocking certain hosts, additional configuration options to enable and set that list for the appropriate backend, and then have that list be queried and the Up/Down value determined based on that.