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

The x override flag seems to be broken in release 1.2.0, was working in 1.1.1 #17

Closed
cschug opened this issue Dec 1, 2022 · 0 comments

Comments

@cschug
Copy link
Contributor

cschug commented Dec 1, 2022

In HAProxy I have a default backend which catches all cases where no ACL was matched in a frontend. It just looks like that

backend                                 BE_http_no_match
    mode                                http
    http-request                        deny deny_status 400

It's pretty obvious that this backend will never have any servers, therefore it should be possible to exempt such backends from monitoring. So far, up to release 1.1.1, this was possible by providing -O BE_http_no_match:x as a parameter.

With 1.2.0 running in debug mode I can see that the override is still processed correctly but the check goes critical and complains exactly about that backend which should rather be ignored.

$ check_haproxy -S /run/haproxy-stats.xymon.sock -D u,2,1 -O BE_http_no_match:x --debug | grep BE_http_no_match
build_checks{} building BACKEND check for BE_http_no_match
build_checks{} processing override BE_http_no_match:x
check_backends{} checking BACKEND BE_http_no_match
check_haproxy CRITICAL - Backend BE_http_no_match servers (up: 0, down 0, disabled 0, total 0) | [REDACTED] backend_BE_http_no_match_servers_up=0;2;1;;0 backend_BE_http_no_match_servers_down=0;;;;0 backend_BE_http_no_match_servers_disabled=0;;;;0 backend_BE_http_no_match_sessions=0;4796;5755 [REDACTED]

I'm not really a Perl guy, but the latest code change around the code comment "Merge the two arrays" looks a suspicious to me, because the rewritten regular expression https://github.com/DinoTools/monitoring-check_haproxy/blob/1.2.0/check_haproxy#L150-L154 doesn't match the x case anymore, https://github.com/DinoTools/monitoring-check_haproxy/blob/1.2.0/check_haproxy#L459, and the configuration doesn't get applied.

@phibos phibos closed this as completed in 1b8425a Nov 30, 2023
phibos added a commit that referenced this issue Nov 30, 2023
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

No branches or pull requests

1 participant