Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to model a "at least one" check #17

Closed
dberardo opened this issue Mar 3, 2021 · 3 comments · Fixed by #19
Closed

how to model a "at least one" check #17

dberardo opened this issue Mar 3, 2021 · 3 comments · Fixed by #19

Comments

@dberardo
Copy link

dberardo commented Mar 3, 2021

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 ruby script be adapted / configured to achieve this check?

@dberardo
Copy link
Author

dberardo commented Mar 3, 2021

fixed in #18

benprew added a commit that referenced this issue Mar 21, 2021
Previously, check_haproxy would consider it a crit if any server was DOWN, change it so
it only considers a full BACKEND or FRONTEND failure a crit ( Fixes #17. )

Have better active/backup role testing, to ignore backup servers that are
down. ( Fixes #14 )
@benprew
Copy link
Owner

benprew commented Mar 21, 2021

@dberardo Thanks for raising this issue, it is similar to issue #14, where a backup server is listed at DOWN shouldn't cause a CRITICAL error. I put together a fix for this and 14 in PR #19 . Can you test with the updated version of check_haproxy.rb to see if that fixes your issue? If not, can you send an example haproxy .csv file I could use to test against?

Thanks

@dberardo-com
Copy link

for the moment, the changes proposed in #18 are already "fixing the issue" for my use case. I could however give a try at the proposed changes in #19 as well. Hopefully this week still.

benprew added a commit that referenced this issue Apr 29, 2021
Previously, check_haproxy would consider it a crit if any server was DOWN, change it so
it only considers a full BACKEND or FRONTEND failure a crit ( Fixes #17. )

Have better active/backup role testing, to ignore backup servers that are
down. ( Fixes #14 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants