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
147 stars 87 forks source link

How to exclude interface while using _adminup_ argument? #265

Closed OG2K closed 2 years ago

OG2K commented 3 years ago

Dears,

1) How do I exclude particular interface, giving script adminup argument? i.e we have an known issue with particular interface.

$ '/usr/lib64/nagios/plugins/check_nwc_health' '--hostname' 'xxx.xxx.xxx.xxx' '--community' 'xxx' '--mode' 'interface-status' '--name' '_adminup_' '--multiline'
CRITICAL - fault condition is presumed to exist on port-channel99 (alias xxx to xxx1fic0-B), mgmt0 is up/up

2) Is it possible to combine adminup argument with regexp? for example, I could pass adminup and neglect interface in the filter?

Wishing everybody be safe, BR /A

Bierchermuesli commented 2 years ago

There is an example in the code for this --name '(lan|wan|_adminup_)'

In my case: --name '(Po|_adminup_)' --> Check all Port Channels but ignore admin down

This case can be closed I guess

OG2K commented 2 years ago

Sure, thanks a lot for this feature. /A