check_haproxy
check_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?
i was wondering, that maybe changing the type flag here could lead somewhere, but i cannot find a proper reference for types in the code, so i ma not sure:
if ( $stats{$pxname}{$svname}{'type'} eq '2' ) {