lausser / check_nwc_health

nwc = network component. This plugin checks lots of aspects of routers, switches, wlan controllers, firewalls,.....
http://labs.consol.de/nagios/check_nwc_health
GNU General Public License v2.0
149 stars 88 forks source link

Checks on interfaces that don't exist return the state UNKNOWN #248

Closed sol1-matt closed 3 years ago

sol1-matt commented 4 years ago

Some interfaces don't exist if they aren't up, eg: vpn interfaces.

For a check that runs on a interface like this check_nwc_health knows there are no interfaces but returns UNKNOWN (https://github.com/lausser/check_nwc_health/blob/master/plugins-scripts/Classes/Server/LinuxLocal.pm line: 83) even though the code knows that there are 'no interfaces'.

If a check passes in a explicit interface, eg: tun0, and the interface doesn't exist the return state shouldn't be UNKNOWN but CRITICAL as we know the interface doesn't exist and not existing for a interface being checked should be a failure.

If there is a requirement to make interfaces that don't exist be UNKNOWN in some instances then a option to toggle better UNKNOWN and CRITICAL as the return codes for a non existent interface would help.

lausser commented 4 years ago

The status of an interface that check_nwc_health could not find is neither OK nor CRITICAL and so it is UNKNOWN.

If you don’t like an exit code, you can always change the behavior with --negate unknown=critical

Von: Matthew Smith [mailto:notifications@github.com] Gesendet: Dienstag, 16. Juni 2020 06:06 An: lausser/check_nwc_health check_nwc_health@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: [lausser/check_nwc_health] Checks on interfaces that don't exist return the state UNKNOWN (#248)

Some interfaces don't exist if they aren't up, eg: vpn interfaces.

For a check that runs on a interface like this check_nwc_health knows there are no interfaces but returns UNKNOWN (https://github.com/lausser/check_nwc_health/blob/master/plugins-scripts/Classes/Server/LinuxLocal.pm line: 83) even though the code knows that there are 'no interfaces'.

If a check passes in a explicit interface, eg: tun0, and the interface doesn't exist the return state shouldn't be UNKNOWN but CRITICAL as we know the interface doesn't exist and not existing for a interface being checked should be a failure.

If there is a requirement to make interfaces that don't exist be UNKNOWN in some instances then a option to toggle better UNKNOWN and CRITICAL as the return codes for a non existent interface would help.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lausser/check_nwc_health/issues/248 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQSOEV2SSWOORPDPJ4PJ3RW3VRPANCNFSM4N7HGLQA .