Fix interface availability #345
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently interface availability is not working correctly when ifOperStatus is UP and ifAdminStatus is also UP.
Also, one wants to consider the number of unavailable interfaces, instead of the number of available ones, when checking the thresholds - otherwise we can't consistently have a reasonable default threshold.
For example, if a machine has 8 interfaces, and one wants the check to be critical if only 7 are available, there is no suitable default for that if we compare to the number of "available" interfaces. But if we compare to the number of "unavailable" interfaces, then the default for "critical" can always be ~:0 (or just 0) and with that we'll have the desired effect.
Change this and adjust the default for the warning and critical values (we considered "warning" as undefined by default).