check_nwc_health icon indicating copy to clipboard operation
check_nwc_health copied to clipboard

Mode count-bgp-prefixes won't be called

Open weberdigital opened this issue 4 years ago • 3 comments

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.

weberdigital avatar Aug 27 '19 13:08 weberdigital

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 avatar Jul 02 '20 13:07 Ondjultomte

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

Ondjultomte avatar Nov 23 '20 10:11 Ondjultomte

anyone?

Ondjultomte avatar Feb 19 '21 22:02 Ondjultomte