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

Mode count-bgp-prefixes won't be called #214

Open weberdigital opened 5 years ago

weberdigital commented 5 years ago

Hi,

We use the device Cisco IOS Software [Fuji], ASR1000 software (X86_64_LINUX_IOSD-UNIVERSALK9-M) and want to use the "count-bgp-prefixes" mode.

We found out that the mode "bgp-peer-status" is always executed when we use the mode "count-bgp-prefixes".

Analysis in the source code suggests that the initial decision which subsystem should be used skips the entry for the submodule "Classes::Cisco::IOS::Component::BgpSubsystem".

A fix for this would be as follows, by exchanging the line https://github.com/lausser/check_nwc_health/blob/d8273b3eec3aeac81658471b64034f9f095b7a30/plugins-scripts/Classes/Cisco.pm#L36 with the following source code:

        if ($self->mode =~ /device::bgp::prefix::count/) {
          $self->analyze_and_check_interface_subsystem("Classes::Cisco::IOS::Component::BgpSubsystem");
        } else {
          $self->analyze_and_check_interface_subsystem("Classes::Cisco::CISCOBGP4MIB::Component::PeerSubsystem");
        }

Thanks for bugfixing.

Ondjultomte commented 4 years ago

Got the same issue on asr1001

USER1/check_nwc_health -H 10.111 -C xxxxx --mode count-bgp-prefixes --verbose -t 20 Result code: OK OK - peer 10.xxxxx (AS65xxx) state is established since 9d, 17h, 3m, 34s, ..... cut.... checking bgp peers

Same results as count bgp peers.

Ondjultomte commented 3 years ago

Any news on this issue? Have the proposed fix been looked at ?

Ondjultomte commented 3 years ago

anyone?