check_haproxy icon indicating copy to clipboard operation
check_haproxy copied to clipboard

how to model a "at least one" check

Open dberardo opened this issue 4 years ago • 1 comments

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?

dberardo avatar Mar 03 '21 09:03 dberardo

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' ) {

dberardo avatar Mar 03 '21 09:03 dberardo