Skip to content

Commit

Permalink
add mode interface-errdisabled (Cisco and Arista only)
Browse files Browse the repository at this point in the history
  • Loading branch information
lausser committed Nov 30, 2023
1 parent 9549685 commit a7b8f18
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* 2023-11-30 11.2.2
add mode interface-errdisabled (Cisco and Arista only)
* 2023-11-15 11.2.1.2
require, not use Net::Ping for F5 checks
* 2023-10-27 11.2.1.1
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_REVISION ($Revision: 1.150 $)
AC_PREREQ([2.71])
AC_INIT([check_nwc_health],[11.2.1.2])
AC_INIT([check_nwc_health],[11.2.2])
AM_INIT_AUTOMAKE([1.9 tar-pax])
AM_MAINTAINER_MODE([disable])
AC_CANONICAL_HOST
Expand Down
6 changes: 6 additions & 0 deletions plugins-scripts/CheckNwcHealth/Arista.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ sub init {
$self->no_such_mode();
}
}
} elsif ($self->mode =~ /device::interfacex::errdisabled/) {
if ($self->implements_mib('ARISTA-IF-MIB')) {
$self->analyze_and_check_interface_subsystem("CheckNwcHealth::Arista::ARISTAIFMIB::Component::InterfaceSubsystem");
} else {
$self->no_such_mode();
}
} else {
$self->no_such_mode();
}
Expand Down
6 changes: 6 additions & 0 deletions plugins-scripts/CheckNwcHealth/Cisco.pm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ sub init {
} else {
$self->no_such_mode();
}
} elsif ($self->mode =~ /device::interfacex::errdisabled/) {
# if ($self->implements_mib('CISCO-ERR-DISABLE-MIB')) {
# Ist bloed, aber wenn keine Spur dieser Mib zu finden ist,
# dann kann das schlichtweg bedeuten, dass kein Interface
# disabled wurde.
$self->analyze_and_check_interface_subsystem("CheckNwcHealth::Cisco::CISCOERRDISABLEMIB::Component::InterfaceSubsystem");
} elsif ($self->mode =~ /device::interfaces::etherstats/) {
if ($self->implements_mib('OLD-CISCO-INTERFACES-MIB')) {
$self->analyze_and_check_interface_subsystem("CheckNwcHealth::Cisco::OLDCISCOINTERFACESMIB::Component::InterfaceSubsystem");
Expand Down
4 changes: 4 additions & 0 deletions plugins-scripts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ GL_MODULES=\
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ALCATELIND1BASEMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTABGP4V2MIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTAENTITYSENSORMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTAIFMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARUBATCMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARUBAWIREDCHASSISMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARUBAWIREDFANTRAYMIB.pm \
Expand Down Expand Up @@ -46,6 +47,7 @@ GL_MODULES=\
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOENTITYFRUCONTROLMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOENTITYSENSORMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOENVMONMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOERRDISABLEMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOETHERNETFABRICEXTENDERMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOFEATURECONTROLMIB.pm \
../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOFIREWALLMIB.pm \
Expand Down Expand Up @@ -227,6 +229,7 @@ EXTRA_MODULES=\
CheckNwcHealth/Cisco/CISCOSDWANMIB/Component/SdwanSubsystem.pm \
CheckNwcHealth/Cisco/CISCOSTACKMIB/Component/StackSubsystem.pm \
CheckNwcHealth/Cisco/CISCOSTACKWISEMIB/Component/StackSubsystem.pm \
CheckNwcHealth/Cisco/CISCOERRDISABLEMIB/Component/InterfaceSubsystem.pm \
CheckNwcHealth/Cisco/ASA.pm \
CheckNwcHealth/Cisco/IOS/Component/HaSubsystem.pm \
CheckNwcHealth/Cisco/IOS/Component/ConfigSubsystem.pm \
Expand Down Expand Up @@ -487,6 +490,7 @@ EXTRA_MODULES=\
CheckNwcHealth/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm \
CheckNwcHealth/Arista/Component/EnvironmentalSubsystem.pm \
CheckNwcHealth/Arista/Component/DiskSubsystem.pm \
CheckNwcHealth/Arista/ARISTAIFMIB/Component/InterfaceSubsystem.pm \
CheckNwcHealth/Arista.pm \
CheckNwcHealth/Riverbed/SteelheadEX/Component/EnvironmentalSubsystem.pm \
CheckNwcHealth/Riverbed/Steelhead/Component/EnvironmentalSubsystem.pm \
Expand Down
7 changes: 7 additions & 0 deletions plugins-scripts/check_nwc_health.pl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ sub run_plugin {
alias => undef,
help => 'Check if interfaces operate in duplex mode',
);
$plugin->add_mode(
internal => 'device::interfacex::errdisabled',
# interfacesx because it should not be propagated to a parent class
spec => 'interface-errdisabled',
alias => undef,
help => 'Check for interfaces in state "error disabled"',
);
$plugin->add_mode(
internal => 'device::interfaces::complete',
spec => 'interface-health',
Expand Down

0 comments on commit a7b8f18

Please sign in to comment.