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

custom_query --reverse with critical and warning values returns OK #21

Open
toebivankenoebi opened this issue Jan 31, 2013 · 0 comments

Comments

@toebivankenoebi
Copy link

When doing a --reverse check with custom_query and using both warning and critical values, the result is always OK.

This is caused by the sub validate_range () which returns no values back to custom_query.

I fixed it with the following lines:

2187 if (length $warning and length $critical and $warning > $critical) { {
2188 # Original
2189 #return if $opt{reverse};
2190 # Option 1, following checks won't get executed
2191 #return ($warning,$critical) if $opt{reverse};
2192 # Option 2, break out of the if statement, needs another { }
2193 last if $opt{reverse};
2194 ndie msg('range-warnbig');
2195 } }

As I'm not a programmer, could you please review and if ok, include it in the next release.

Cheers

Tobias

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