Hello community, here is the log from the commit of package monitoring-plugins-nwc_health for openSUSE:Factory checked in at 2020-05-26 17:50:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-nwc_health (Old) and /work/SRC/openSUSE:Factory/.monitoring-plugins-nwc_health.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins-nwc_health" Tue May 26 17:50:35 2020 rev:4 rq:808847 version:7.11 Changes: -------- --- /work/SRC/openSUSE:Factory/monitoring-plugins-nwc_health/monitoring-plugins-nwc_health.changes 2020-03-22 14:18:32.902109877 +0100 +++ /work/SRC/openSUSE:Factory/.monitoring-plugins-nwc_health.new.2738/monitoring-plugins-nwc_health.changes 2020-05-26 17:50:39.120055664 +0200 @@ -1,0 +2,20 @@ +Fri May 22 06:21:18 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 7.11 + * add bgp4 modes for arista, use 2nd context for cisco bgp4 + +------------------------------------------------------------------- +Tue May 19 17:15:22 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 7.10.4.1 + * fix a typo + +------------------------------------------------------------------- +Mon May 18 16:33:08 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 7.10.4 + * check increase of sessions for Cisco (detect freeze with + --mode vpn-sessions --criticalx sessions_per_sec=0.001:) + * add AVM 7580 + +------------------------------------------------------------------- Old: ---- check_nwc_health-7.10.3.tar.gz New: ---- check_nwc_health-7.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ monitoring-plugins-nwc_health.spec ++++++ --- /var/tmp/diff_new_pack.2PHfi9/_old 2020-05-26 17:50:39.728056996 +0200 +++ /var/tmp/diff_new_pack.2PHfi9/_new 2020-05-26 17:50:39.728056996 +0200 @@ -19,7 +19,7 @@ %define realname check_nwc_health Name: monitoring-plugins-nwc_health -Version: 7.10.3 +Version: 7.11 Release: 0 Summary: This plugin checks the health of network components and interfaces # https://github.com/lausser/check_nwc_health ++++++ check_nwc_health-7.10.3.tar.gz -> check_nwc_health-7.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/ChangeLog new/check_nwc_health-7.11/ChangeLog --- old/check_nwc_health-7.10.3/ChangeLog 2020-03-20 14:55:36.487989100 +0100 +++ new/check_nwc_health-7.11/ChangeLog 2020-05-21 22:07:55.707973800 +0200 @@ -1,3 +1,11 @@ +* 2020-05-21 7.11 + add bgp4 modes for arista, use 2nd context for cisco bgp4 +* 2020-05-19 7.10.4.1 + fix a typo +* 2020-05-05 7.10.4 + check increase of sessions for Cisco + (detect freeze with --mode vpn-sessions --criticalx sessions_per_sec=0.001:) + add AVM 7580 * 2020-03-20 7.10.3 add mode vpn-sessions (IOS and ASA) * 2020-03-16 7.10.2.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTABGP4V2MIB.pm new/check_nwc_health-7.11/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTABGP4V2MIB.pm --- old/check_nwc_health-7.10.3/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTABGP4V2MIB.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/check_nwc_health-7.11/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ARISTABGP4V2MIB.pm 2020-05-21 22:07:55.888267200 +0200 @@ -0,0 +1,159 @@ +package Monitoring::GLPlugin::SNMP::MibsAndOids::ARISTABGP4V2MIB; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARISTA-BGP4V2-MIB'} = { + url => '', + name => 'ARISTA-BGP4V2-MIB', +}; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARISTA-BGP4V2-MIB'} = + '1.3.6.1.4.1.30065.4.1'; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARISTA-BGP4V2-MIB'} = { + aristaBgp4V2 => '1.3.6.1.4.1.30065.4.1', + aristaBgp4V2Notifications => '1.3.6.1.4.1.30065.4.1.0', + aristaBgp4V2Objects => '1.3.6.1.4.1.30065.4.1.1', + aristaBgp4V2DiscontinuityTable => '1.3.6.1.4.1.30065.4.1.1.1', + aristaBgp4V2DiscontinuityEntry => '1.3.6.1.4.1.30065.4.1.1.1.1', + aristaBgp4V2DiscontinuityTime => '1.3.6.1.4.1.30065.4.1.1.1.1.1', + aristaBgp4V2PeerTable => '1.3.6.1.4.1.30065.4.1.1.2', + aristaBgp4V2PeerEntry => '1.3.6.1.4.1.30065.4.1.1.2.1', + aristaBgp4V2PeerInstance => '1.3.6.1.4.1.30065.4.1.1.2.1.1', + aristaBgp4V2PeerLocalAddrType => '1.3.6.1.4.1.30065.4.1.1.2.1.2', + aristaBgp4V2PeerLocalAddrTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + aristaBgp4V2PeerLocalAddr => '1.3.6.1.4.1.30065.4.1.1.2.1.3', + aristaBgp4V2PeerLocalAddrDefinition => 'INET-ADDRESS-MIB::InetAddress(aristaBgp4V2PeerLocalAddrType)', + aristaBgp4V2PeerRemoteAddrType => '1.3.6.1.4.1.30065.4.1.1.2.1.4', + aristaBgp4V2PeerRemoteAddrTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + aristaBgp4V2PeerRemoteAddr => '1.3.6.1.4.1.30065.4.1.1.2.1.5', + aristaBgp4V2PeerRemoteAddrDefinition => 'INET-ADDRESS-MIB::InetAddress(aristaBgp4V2PeerRemoteAddrType)', + aristaBgp4V2PeerLocalPort => '1.3.6.1.4.1.30065.4.1.1.2.1.6', + aristaBgp4V2PeerLocalAs => '1.3.6.1.4.1.30065.4.1.1.2.1.7', + aristaBgp4V2PeerLocalIdentifier => '1.3.6.1.4.1.30065.4.1.1.2.1.8', + aristaBgp4V2PeerLocalIdentifierDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2IdentifierTC', + aristaBgp4V2PeerRemotePort => '1.3.6.1.4.1.30065.4.1.1.2.1.9', + aristaBgp4V2PeerRemoteAs => '1.3.6.1.4.1.30065.4.1.1.2.1.10', + aristaBgp4V2PeerRemoteIdentifier => '1.3.6.1.4.1.30065.4.1.1.2.1.11', + aristaBgp4V2PeerRemoteIdentifierDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2IdentifierTC', + aristaBgp4V2PeerAdminStatus => '1.3.6.1.4.1.30065.4.1.1.2.1.12', + aristaBgp4V2PeerAdminStatusDefinition => 'ARISTA-BGP4V2-MIB::aristaBgp4V2PeerAdminStatus', + aristaBgp4V2PeerState => '1.3.6.1.4.1.30065.4.1.1.2.1.13', + aristaBgp4V2PeerStateDefinition => 'ARISTA-BGP4V2-MIB::aristaBgp4V2PeerState', + aristaBgp4V2PeerDescription => '1.3.6.1.4.1.30065.4.1.1.2.1.14', + aristaBgp4V2PeerErrorsTable => '1.3.6.1.4.1.30065.4.1.1.3', + aristaBgp4V2PeerErrorsEntry => '1.3.6.1.4.1.30065.4.1.1.3.1', + aristaBgp4V2PeerLastErrorCodeReceived => '1.3.6.1.4.1.30065.4.1.1.3.1.1', + aristaBgp4V2PeerLastErrorSubCodeReceived => '1.3.6.1.4.1.30065.4.1.1.3.1.2', + aristaBgp4V2PeerLastErrorReceivedTime => '1.3.6.1.4.1.30065.4.1.1.3.1.3', + aristaBgp4V2PeerLastErrorReceivedText => '1.3.6.1.4.1.30065.4.1.1.3.1.4', + aristaBgp4V2PeerLastErrorReceivedData => '1.3.6.1.4.1.30065.4.1.1.3.1.5', + aristaBgp4V2PeerLastErrorCodeSent => '1.3.6.1.4.1.30065.4.1.1.3.1.6', + aristaBgp4V2PeerLastErrorSubCodeSent => '1.3.6.1.4.1.30065.4.1.1.3.1.7', + aristaBgp4V2PeerLastErrorSentTime => '1.3.6.1.4.1.30065.4.1.1.3.1.8', + aristaBgp4V2PeerLastErrorSentText => '1.3.6.1.4.1.30065.4.1.1.3.1.9', + aristaBgp4V2PeerLastErrorSentData => '1.3.6.1.4.1.30065.4.1.1.3.1.10', + aristaBgp4V2PeerEventTimesTable => '1.3.6.1.4.1.30065.4.1.1.4', + aristaBgp4V2PeerEventTimesEntry => '1.3.6.1.4.1.30065.4.1.1.4.1', + aristaBgp4V2PeerFsmEstablishedTime => '1.3.6.1.4.1.30065.4.1.1.4.1.1', + aristaBgp4V2PeerInUpdatesElapsedTime => '1.3.6.1.4.1.30065.4.1.1.4.1.2', + aristaBgp4V2PeerConfiguredTimersTable => '1.3.6.1.4.1.30065.4.1.1.5', + aristaBgp4V2PeerConfiguredTimersEntry => '1.3.6.1.4.1.30065.4.1.1.5.1', + aristaBgp4V2PeerConnectRetryInterval => '1.3.6.1.4.1.30065.4.1.1.5.1.1', + aristaBgp4V2PeerHoldTimeConfigured => '1.3.6.1.4.1.30065.4.1.1.5.1.2', + aristaBgp4V2PeerKeepAliveConfigured => '1.3.6.1.4.1.30065.4.1.1.5.1.3', + aristaBgp4V2PeerMinASOrigInterval => '1.3.6.1.4.1.30065.4.1.1.5.1.4', + aristaBgp4V2PeerMinRouteAdverInterval => '1.3.6.1.4.1.30065.4.1.1.5.1.5', + aristaBgp4V2PeerNegotiatedTimersTable => '1.3.6.1.4.1.30065.4.1.1.6', + aristaBgp4V2PeerNegotiatedTimersEntry => '1.3.6.1.4.1.30065.4.1.1.6.1', + aristaBgp4V2PeerHoldTime => '1.3.6.1.4.1.30065.4.1.1.6.1.1', + aristaBgp4V2PeerKeepAlive => '1.3.6.1.4.1.30065.4.1.1.6.1.2', + aristaBgp4V2PeerCountersTable => '1.3.6.1.4.1.30065.4.1.1.7', + aristaBgp4V2PeerCountersEntry => '1.3.6.1.4.1.30065.4.1.1.7.1', + aristaBgp4V2PeerInUpdates => '1.3.6.1.4.1.30065.4.1.1.7.1.1', + aristaBgp4V2PeerOutUpdates => '1.3.6.1.4.1.30065.4.1.1.7.1.2', + aristaBgp4V2PeerInTotalMessages => '1.3.6.1.4.1.30065.4.1.1.7.1.3', + aristaBgp4V2PeerOutTotalMessages => '1.3.6.1.4.1.30065.4.1.1.7.1.4', + aristaBgp4V2PeerFsmEstablishedTransitions => '1.3.6.1.4.1.30065.4.1.1.7.1.5', + aristaBgp4V2PrefixGaugesTable => '1.3.6.1.4.1.30065.4.1.1.8', + aristaBgp4V2PrefixGaugesEntry => '1.3.6.1.4.1.30065.4.1.1.8.1', + aristaBgp4V2PrefixGaugesAfi => '1.3.6.1.4.1.30065.4.1.1.8.1.1', + aristaBgp4V2PrefixGaugesAfiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2AddressFamilyIdentifierTC', + aristaBgp4V2PrefixGaugesSafi => '1.3.6.1.4.1.30065.4.1.1.8.1.2', + aristaBgp4V2PrefixGaugesSafiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2SubsequentAddressFamilyIdentifierTC', + aristaBgp4V2PrefixInPrefixes => '1.3.6.1.4.1.30065.4.1.1.8.1.3', + aristaBgp4V2PrefixInPrefixesAccepted => '1.3.6.1.4.1.30065.4.1.1.8.1.4', + aristaBgp4V2PrefixOutPrefixes => '1.3.6.1.4.1.30065.4.1.1.8.1.5', + aristaBgp4V2NlriTable => '1.3.6.1.4.1.30065.4.1.1.9', + aristaBgp4V2NlriEntry => '1.3.6.1.4.1.30065.4.1.1.9.1', + aristaBgp4V2NlriIndex => '1.3.6.1.4.1.30065.4.1.1.9.1.1', + aristaBgp4V2NlriAfi => '1.3.6.1.4.1.30065.4.1.1.9.1.2', + aristaBgp4V2NlriAfiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2AddressFamilyIdentifierTC', + aristaBgp4V2NlriSafi => '1.3.6.1.4.1.30065.4.1.1.9.1.3', + aristaBgp4V2NlriSafiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2SubsequentAddressFamilyIdentifierTC', + aristaBgp4V2NlriPrefixType => '1.3.6.1.4.1.30065.4.1.1.9.1.4', + aristaBgp4V2NlriPrefix => '1.3.6.1.4.1.30065.4.1.1.9.1.5', + aristaBgp4V2NlriPrefixLen => '1.3.6.1.4.1.30065.4.1.1.9.1.6', + aristaBgp4V2NlriBest => '1.3.6.1.4.1.30065.4.1.1.9.1.7', + aristaBgp4V2NlriCalcLocalPref => '1.3.6.1.4.1.30065.4.1.1.9.1.8', + aristaBgp4V2NlriOrigin => '1.3.6.1.4.1.30065.4.1.1.9.1.9', + aristaBgp4V2NlriOriginDefinition => 'ARISTA-BGP4V2-MIB::aristaBgp4V2NlriOrigin', + aristaBgp4V2NlriNextHopAddrType => '1.3.6.1.4.1.30065.4.1.1.9.1.10', + aristaBgp4V2NlriNextHopAddr => '1.3.6.1.4.1.30065.4.1.1.9.1.11', + aristaBgp4V2NlriLinkLocalNextHopAddrType => '1.3.6.1.4.1.30065.4.1.1.9.1.12', + aristaBgp4V2NlriLinkLocalNextHopAddr => '1.3.6.1.4.1.30065.4.1.1.9.1.13', + aristaBgp4V2NlriLocalPrefPresent => '1.3.6.1.4.1.30065.4.1.1.9.1.14', + aristaBgp4V2NlriLocalPref => '1.3.6.1.4.1.30065.4.1.1.9.1.15', + aristaBgp4V2NlriMedPresent => '1.3.6.1.4.1.30065.4.1.1.9.1.16', + aristaBgp4V2NlriMed => '1.3.6.1.4.1.30065.4.1.1.9.1.17', + aristaBgp4V2NlriAtomicAggregate => '1.3.6.1.4.1.30065.4.1.1.9.1.18', + aristaBgp4V2NlriAggregatorPresent => '1.3.6.1.4.1.30065.4.1.1.9.1.19', + aristaBgp4V2NlriAggregatorAS => '1.3.6.1.4.1.30065.4.1.1.9.1.20', + aristaBgp4V2NlriAggregatorAddr => '1.3.6.1.4.1.30065.4.1.1.9.1.21', + aristaBgp4V2NlriAsPathCalcLength => '1.3.6.1.4.1.30065.4.1.1.9.1.22', + aristaBgp4V2NlriAsPathString => '1.3.6.1.4.1.30065.4.1.1.9.1.23', + aristaBgp4V2NlriAsPath => '1.3.6.1.4.1.30065.4.1.1.9.1.24', + aristaBgp4V2NlriPathAttrUnknown => '1.3.6.1.4.1.30065.4.1.1.9.1.25', + aristaBgp4V2AdjRibsOutTable => '1.3.6.1.4.1.30065.4.1.1.10', + aristaBgp4V2AdjRibsOutEntry => '1.3.6.1.4.1.30065.4.1.1.10.1', + aristaBgp4V2AdjRibsOutIndex => '1.3.6.1.4.1.30065.4.1.1.10.1.1', + aristaBgp4V2AdjRibsOutRoute => '1.3.6.1.4.1.30065.4.1.1.10.1.2', + aristaBgp4V2Conformance => '1.3.6.1.4.1.30065.4.1.2', + aristaBgp4V2Compliances => '1.3.6.1.4.1.30065.4.1.2.1', + aristaBgp4V2Groups => '1.3.6.1.4.1.30065.4.1.2.2', +}; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARISTA-BGP4V2-MIB'} = { + aristaBgp4V2NlriOrigin => { + '1' => 'igp', + '2' => 'egp', + '3' => 'incomplete', + }, + aristaBgp4V2PeerAdminStatus => { + '1' => 'halted', + '2' => 'running', + }, + aristaBgp4V2PeerState => { + '1' => 'idle', + '2' => 'connect', + '3' => 'active', + '4' => 'opensent', + '5' => 'openconfirm', + '6' => 'established', + }, +}; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARISTA-BGP4V2-TC-MIB'} = { + AristaBgp4V2IdentifierTC => sub { + my ($addr) = @_; + return Monitoring::GLPlugin::SNMP::TableItem->new()->unhex_ip($addr); + }, + AristaBgp4V2AddressFamilyIdentifierTC => { + 1 => 'ipv4', + 2 => 'ipv6', + }, + AristaBgp4V2SubsequentAddressFamilyIdentifierTC => { + 1 => 'unicast', + 2 => 'multicast', + 4 => 'mpls', + }, +}; + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOLWAPPHAMIB.pm new/check_nwc_health-7.11/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOLWAPPHAMIB.pm --- old/check_nwc_health-7.10.3/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOLWAPPHAMIB.pm 2020-03-20 14:55:36.992987100 +0100 +++ new/check_nwc_health-7.11/GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/CISCOLWAPPHAMIB.pm 2020-05-21 22:07:56.165232000 +0200 @@ -1,14 +1,42 @@ package Monitoring::GLPlugin::SNMP::MibsAndOids::CISCOLWAPPHAMIB; +# -- CISCO-LWAPP-HA-MIB.my : +# -- Jan 2012, Gayathri +# -- +# -- Copyright (c) 2007, 2014-2015 by Cisco Systems, Inc. +# LAST-UPDATED "201201051150Z" +# ... +# REVISION "201201241150Z" +# DESCRIPTION +# "Initial version of this MIB module. " +# ::= { ciscoMgmt 198888 } +# +# ...und irgendwann taucht dann das hier auf. Einfach so. +# Sowas kommt zufällig ans Tageslicht, weil ein check_nwc_health-Anwender +# seinen WLC von 8.5.135.0 auf Version 8.10.121.0 updatet und dadurch +# 1.3.6.1.4.1.9.9.198888 durch 1.3.6.1.4.1.9.9.843 ersetzt wurde. +# +# -- CISCO-LWAPP-HA-MIB.my : +# -- Jan 2012, Gayathri <--- Pappnase +# -- +# -- Copyright (c) 2017-2018 by Cisco Systems, Inc. +# LAST-UPDATED "201703140000Z" +# ... +# REVISION "201703140000Z" +# DESCRIPTION +# "Initial version of this MIB module." +# ::= { ciscoMgmt 843 } +# + $Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'CISCO-LWAPP-HA-MIB'} = { url => '', name => 'CISCO-LWAPP-HA-MIB', }; -$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-LWAPP-HA-MIB'} = +$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-LWAPP-HA-MIB::2012'} = '1.3.6.1.4.1.9.9.198888'; -$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB'} = { +$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB::2012'} = { ciscoLwappHaMIB => '1.3.6.1.4.1.9.9.198888', ciscoLwappHaMIBObjects => '1.3.6.1.4.1.9.9.198888.0', ciscoLwappHaGlobalConfig => '1.3.6.1.4.1.9.9.198888.0.1', @@ -99,7 +127,7 @@ cLHaBulkSyncStatus => '1.3.6.1.4.1.9.9.198888.0.6.3', }; -$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB'} = { +$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB::2012'} = { cLHaSecondaryControllerUsageTrapType => { '1' => 'usageStart', '2' => 'usageComplete', @@ -129,3 +157,125 @@ '5' => 'timeout', }, }; + + +$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-LWAPP-HA-MIB::2017'} = + '1.3.6.1.4.1.9.9.843'; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB::2017'} = { + ciscoLwappHaMIB => '1.3.6.1.4.1.9.9.843', + ciscoLwappHaMIBNotifs => '1.3.6.1.4.1.9.9.843.0', + ciscoLwappHaMIBObjects => '1.3.6.1.4.1.9.9.843.1', + ciscoLwappHaGlobalConfig => '1.3.6.1.4.1.9.9.843.1.1', + cLHaApSsoConfig => '1.3.6.1.4.1.9.9.843.1.1.1', + cLHaPeerIpAddressType => '1.3.6.1.4.1.9.9.843.1.1.2', + cLHaPeerIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaPeerIpAddress => '1.3.6.1.4.1.9.9.843.1.1.3', + cLHaPeerIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaPeerIpAddressType)', + cLHaServicePortPeerIpAddressType => '1.3.6.1.4.1.9.9.843.1.1.4', + cLHaServicePortPeerIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaServicePortPeerIpAddress => '1.3.6.1.4.1.9.9.843.1.1.5', + cLHaServicePortPeerIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaServicePortPeerIpAddressType)', + cLHaServicePortPeerIpNetMaskType => '1.3.6.1.4.1.9.9.843.1.1.6', + cLHaServicePortPeerIpNetMaskTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaServicePortPeerIpNetMask => '1.3.6.1.4.1.9.9.843.1.1.7', + cLHaServicePortPeerIpNetMaskDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaServicePortPeerIpNetMaskType)', + cLHaRedundancyIpAddressType => '1.3.6.1.4.1.9.9.843.1.1.8', + cLHaRedundancyIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaRedundancyIpAddress => '1.3.6.1.4.1.9.9.843.1.1.9', + cLHaRedundancyIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaRedundancyIpAddressType)', + cLHaPeerMacAddress => '1.3.6.1.4.1.9.9.843.1.1.10', + cLHaVirtualMacAddress => '1.3.6.1.4.1.9.9.843.1.1.11', + cLHaPrimaryUnit => '1.3.6.1.4.1.9.9.843.1.1.12', + cLHaPrimaryUnitDefinition => 'SNMPv2-TC-v1-MIB::TruthValue', + cLHaLinkEncryption => '1.3.6.1.4.1.9.9.843.1.1.13', + cLHaNetworkFailOver => '1.3.6.1.4.1.9.9.843.1.1.14', + cLHaNetworkFailOverDefinition => 'SNMPv2-TC-v1-MIB::TruthValue', + cLHaRFStatusUnitIp => '1.3.6.1.4.1.9.9.843.1.1.15', + cLHaKATimeout => '1.3.6.1.4.1.9.9.843.1.1.16', + cLHaKARetryCount => '1.3.6.1.4.1.9.9.843.1.1.17', + cLHaGwRetryCount => '1.3.6.1.4.1.9.9.843.1.1.18', + cLHaPeerSearchTimeout => '1.3.6.1.4.1.9.9.843.1.1.19', + cLHaRFStatusUnitIpType => '1.3.6.1.4.1.9.9.843.1.1.20', + ciscoLwappHaNetworkConfig => '1.3.6.1.4.1.9.9.843.1.2', + cLHaNetworkRoutePeerConfigTable => '1.3.6.1.4.1.9.9.843.1.2.1', + cLHaNetworkRoutePeerConfigEntry => '1.3.6.1.4.1.9.9.843.1.2.1.1', + cLHaNetworkRoutePeerIPAddressType => '1.3.6.1.4.1.9.9.843.1.2.1.1.1', + cLHaNetworkRoutePeerIPAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaNetworkRoutePeerIPAddress => '1.3.6.1.4.1.9.9.843.1.2.1.1.2', + cLHaNetworkRoutePeerIPAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerIPAddressType)', + cLHaNetworkRoutePeerIPNetmaskType => '1.3.6.1.4.1.9.9.843.1.2.1.1.3', + cLHaNetworkRoutePeerIPNetmaskTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaNetworkRoutePeerIPNetmask => '1.3.6.1.4.1.9.9.843.1.2.1.1.4', + cLHaNetworkRoutePeerIPNetmaskDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerIPNetmaskType)', + cLHaNetworkRoutePeerGatewayType => '1.3.6.1.4.1.9.9.843.1.2.1.1.5', + cLHaNetworkRoutePeerGatewayTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType', + cLHaNetworkRoutePeerGateway => '1.3.6.1.4.1.9.9.843.1.2.1.1.6', + cLHaNetworkRoutePeerGatewayDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerGatewayType)', + cLHaNetworkRoutePeerTransferStatus => '1.3.6.1.4.1.9.9.843.1.2.1.1.7', + cLHaNetworkRoutePeerTransferStatusDefinition => 'CISCO-LWAPP-HA-MIB::cLHaNetworkRoutePeerTransferStatus', + cLHaNetworkRoutePeerRowStatus => '1.3.6.1.4.1.9.9.843.1.2.1.1.8', + ciscoLwappHaNotificationVariable => '1.3.6.1.4.1.9.9.843.1.3', + cLHaSecondaryControllerUsageTrapType => '1.3.6.1.4.1.9.9.843.1.3.1', + cLHaSecondaryControllerUsageTrapTypeDefinition => 'CISCO-LWAPP-HA-MIB::cLHaSecondaryControllerUsageTrapType', + cLHaSecondaryControllerUsageDayCounter => '1.3.6.1.4.1.9.9.843.1.3.2', + cLHaBulkSyncCompleteEvent => '1.3.6.1.4.1.9.9.843.1.3.3', + cLHaBulkSyncCompleteEventDefinition => 'CISCO-LWAPP-HA-MIB::cLHaBulkSyncCompleteEvent', + cLHaPeerHotStandbyEvent => '1.3.6.1.4.1.9.9.843.1.3.4', + cLHaPeerHotStandbyEventDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPeerHotStandbyEvent', + ciscoLwappHaPeerStatisticsVariable => '1.3.6.1.4.1.9.9.843.1.4', + ciscoLwappHaSystemStatistics => '1.3.6.1.4.1.9.9.843.1.4.1', + ciscoLwappHaCpuStatistics => '1.3.6.1.4.1.9.9.843.1.4.1.1', + cLHaAllCpuUsage => '1.3.6.1.4.1.9.9.843.1.4.1.1.1', + ciscoLwappHaPowerSupplyStatistics => '1.3.6.1.4.1.9.9.843.1.4.1.2', + cLHaPowerSupply1Present => '1.3.6.1.4.1.9.9.843.1.4.1.2.1', + cLHaPowerSupply1PresentDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply1Present', + cLHaPowerSupply1Operational => '1.3.6.1.4.1.9.9.843.1.4.1.2.2', + cLHaPowerSupply1OperationalDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply1Operational', + cLHaPowerSupply2Present => '1.3.6.1.4.1.9.9.843.1.4.1.2.3', + cLHaPowerSupply2PresentDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply2Present', + cLHaPowerSupply2Operational => '1.3.6.1.4.1.9.9.843.1.4.1.2.4', + cLHaPowerSupply2OperationalDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply2Operational', + ciscoLwappHaMemoryStatistics => '1.3.6.1.4.1.9.9.843.1.4.1.3', + cLHaTotalSystemMemory => '1.3.6.1.4.1.9.9.843.1.4.1.3.1', + cLHaFreeSystemMemory => '1.3.6.1.4.1.9.9.843.1.4.1.3.2', + cLHaUsedSystemMemory => '1.3.6.1.4.1.9.9.843.1.4.1.3.3', + cLHaAllocatedFromRtos => '1.3.6.1.4.1.9.9.843.1.4.1.3.4', + cLHaChunksFree => '1.3.6.1.4.1.9.9.843.1.4.1.3.5', + cLHaMmappedRegions => '1.3.6.1.4.1.9.9.843.1.4.1.3.6', + cLHaSpaceInMmappedRegions => '1.3.6.1.4.1.9.9.843.1.4.1.3.7', + cLHaTotalAllocatedSpace => '1.3.6.1.4.1.9.9.843.1.4.1.3.8', + cLHaTotalNotInUseSpace => '1.3.6.1.4.1.9.9.843.1.4.1.3.9', + cLHaTopMostReleasableSpace => '1.3.6.1.4.1.9.9.843.1.4.1.3.10', + cLHaTotalAllocatedInclMmap => '1.3.6.1.4.1.9.9.843.1.4.1.3.11', + cLHaTotalUsedMmap => '1.3.6.1.4.1.9.9.843.1.4.1.3.12', + cLHaTotalFreeInclMmap => '1.3.6.1.4.1.9.9.843.1.4.1.3.13', + ciscoLwappHaStatisticsVariable => '1.3.6.1.4.1.9.9.843.1.5', + cLHaAvgPeerReachLatency => '1.3.6.1.4.1.9.9.843.1.5.1', + cLHaAvgGwReachLatency => '1.3.6.1.4.1.9.9.843.1.5.2', + cLHaBulkSyncStatus => '1.3.6.1.4.1.9.9.843.1.5.3', + ciscoLwappHaMIBConform => '1.3.6.1.4.1.9.9.843.2', + ciscoLwappHaMIBCompliances => '1.3.6.1.4.1.9.9.843.2.1', + ciscoLwappHaMIBGroups => '1.3.6.1.4.1.9.9.843.2.2', +}; + +$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB::2017'} = { + cLHaNetworkRoutePeerTransferStatus => { + '1' => 'initiate', + '2' => 'inProgress', + '3' => 'success', + '4' => 'failure', + '5' => 'timeout', + }, + cLHaPeerHotStandbyEvent => { + '1' => 'haPeerHotstandby', + }, + cLHaBulkSyncCompleteEvent => { + '1' => 'bulkSyncComplete', + }, + cLHaSecondaryControllerUsageTrapType => { + '1' => 'usageStart', + '2' => 'usageComplete', + '3' => 'overUsage', + }, +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/GLPlugin/lib/Monitoring/GLPlugin.pm new/check_nwc_health-7.11/GLPlugin/lib/Monitoring/GLPlugin.pm --- old/check_nwc_health-7.10.3/GLPlugin/lib/Monitoring/GLPlugin.pm 2020-03-20 14:55:38.154366400 +0100 +++ new/check_nwc_health-7.11/GLPlugin/lib/Monitoring/GLPlugin.pm 2020-05-21 22:07:57.233074100 +0200 @@ -20,7 +20,7 @@ $Data::Dumper::Sparseseen = 1; }; our $AUTOLOAD; -*VERSION = \'3.2.17'; +*VERSION = \'3.2.21'; use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/configure new/check_nwc_health-7.11/configure --- old/check_nwc_health-7.10.3/configure 2020-03-20 14:55:27.094529600 +0100 +++ new/check_nwc_health-7.11/configure 2020-05-21 22:07:46.330601600 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for check_nwc_health 7.10.3. +# Generated by GNU Autoconf 2.69 for check_nwc_health 7.11. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='check_nwc_health' PACKAGE_TARNAME='check_nwc_health' -PACKAGE_VERSION='7.10.3' -PACKAGE_STRING='check_nwc_health 7.10.3' +PACKAGE_VERSION='7.11' +PACKAGE_STRING='check_nwc_health 7.11' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1236,7 +1236,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures check_nwc_health 7.10.3 to adapt to many kinds of systems. +\`configure' configures check_nwc_health 7.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1308,7 +1308,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of check_nwc_health 7.10.3:";; + short | recursive ) echo "Configuration of check_nwc_health 7.11:";; esac cat <<\_ACEOF @@ -1393,7 +1393,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -check_nwc_health configure 7.10.3 +check_nwc_health configure 7.11 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1410,7 +1410,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by check_nwc_health $as_me 7.10.3, which was +It was created by check_nwc_health $as_me 7.11, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2273,7 +2273,7 @@ # Define the identity of the package. PACKAGE='check_nwc_health' - VERSION='7.10.3' + VERSION='7.11' cat >>confdefs.h <<_ACEOF @@ -3324,7 +3324,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by check_nwc_health $as_me 7.10.3, which was +This file was extended by check_nwc_health $as_me 7.11, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3377,7 +3377,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -check_nwc_health config.status 7.10.3 +check_nwc_health config.status 7.11 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/configure.ac new/check_nwc_health-7.11/configure.ac --- old/check_nwc_health-7.10.3/configure.ac 2020-03-20 14:55:36.516673300 +0100 +++ new/check_nwc_health-7.11/configure.ac 2020-05-21 22:07:55.755992000 +0200 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_REVISION ($Revision: 1.150 $) AC_PREREQ(2.58) -AC_INIT(check_nwc_health,7.10.3) +AC_INIT(check_nwc_health,7.11) AM_INIT_AUTOMAKE([1.9 tar-pax]) AM_MAINTAINER_MODE([disable]) AC_CANONICAL_HOST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Classes/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm new/check_nwc_health-7.11/plugins-scripts/Classes/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm --- old/check_nwc_health-7.10.3/plugins-scripts/Classes/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Classes/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm 2020-05-21 22:07:57.433513800 +0200 @@ -0,0 +1,315 @@ +package Classes::Arista::ARISTABGP4V2MIB::Component::PeerSubsystem; +our @ISA = qw(Monitoring::GLPlugin::SNMP::Item); +use strict; + +our $errorcodes = { + # REFERENCE "RFC 4271, Section 4.5." + 0 => { + 0 => 'No Error', + }, + 1 => { + 0 => 'MESSAGE Header Error', + 1 => 'Connection Not Synchronized', + 2 => 'Bad Message Length', + 3 => 'Bad Message Type', + }, + 2 => { + 0 => 'OPEN Message Error', + 1 => 'Unsupported Version Number', + 2 => 'Bad Peer AS', + 3 => 'Bad BGP Identifier', + 4 => 'Unsupported Optional Parameter', + 5 => '[Deprecated => see Appendix A]', + 6 => 'Unacceptable Hold Time', + }, + 3 => { + 0 => 'UPDATE Message Error', + 1 => 'Malformed Attribute List', + 2 => 'Unrecognized Well-known Attribute', + 3 => 'Missing Well-known Attribute', + 4 => 'Attribute Flags Error', + 5 => 'Attribute Length Error', + 6 => 'Invalid ORIGIN Attribute', + 7 => '[Deprecated => see Appendix A]', + 8 => 'Invalid NEXT_HOP Attribute', + 9 => 'Optional Attribute Error', + 10 => 'Invalid Network Field', + 11 => 'Malformed AS_PATH', + }, + 4 => { + 0 => 'Hold Timer Expired', + }, + 5 => { + 0 => 'Finite State Machine Error', + }, + 6 => { + 0 => 'Cease', + 1 => 'Maximum Number of Prefixes Reached', + 2 => 'Administrative Shutdown', + 3 => 'Peer De-configured', + 4 => 'Administrative Reset', + 5 => 'Connection Rejected', + 6 => 'Other Configuration Change', + 7 => 'Connection Collision Resolution', + 8 => 'Out of Resources', + }, +}; + +sub init { + my ($self) = @_; + $self->{peers} = []; + $self->implements_mib('INET-ADDRESS-MIB'); + $self->get_snmp_tables('ARISTA-BGP4V2-MIB', [ + ['peers', 'aristaBgp4V2PeerTable+aristaBgp4V2PeerEventTimesTable+aristaBgp4V2PeerErrorsTable', 'Classes::Arista::ARISTABGP4V2MIB::Component::PeerSubsystem::Peer2', sub { + my $o = shift; + # regexp -> arschlecken! + if ($self->opts->name) { + return $self->filter_name($o->compact_v6($o->{aristaBgp4V2PeerRemoteAddr})); + } else { + return 1; + } + }], + ]); +} + +sub check { + my ($self) = @_; + my $errorfound = 0; + $self->add_info('checking bgp peers'); + if ($self->mode =~ /peer::list/) { + foreach (sort {$a->{aristaBgp4V2PeerRemoteAddr} cmp $b->{aristaBgp4V2PeerRemoteAddr}} @{$self->{peers}}) { + printf "%s\n", $_->{aristaBgp4V2PeerRemoteAddr}; + #$_->list(); + } + $self->add_ok("have fun"); + } elsif ($self->mode =~ /peer::count/) { + $self->add_info(sprintf "found %d peers", scalar(@{$self->{peers}})); + $self->set_thresholds(warning => '1:', critical => '1:'); + $self->add_message($self->check_thresholds(scalar(@{$self->{peers}}))); + $self->add_perfdata( + label => 'peers', + value => scalar(@{$self->{peers}}), + ); + } elsif ($self->mode =~ /peer::watch/) { + # take a snapshot of the peer list. -> good baseline + # warning if there appear peers, mitigate to ok + # critical if warn/crit percent disappear + $self->{numOfPeers} = scalar (@{$self->{peers}}); + $self->{peerNameList} = [map { $_->{aristaBgp4V2PeerRemoteAddr} } @{$self->{peers}}]; + $self->opts->override_opt('lookback', 3600) if ! $self->opts->lookback; + if ($self->opts->reset) { + my $statefile = $self->create_statefile(name => 'bgppeerlist', lastarray => 1); + unlink $statefile if -f $statefile; + } + $self->valdiff({name => 'bgppeerlist', lastarray => 1}, + qw(peerNameList numOfPeers)); + my $problem = 0; + if ($self->opts->warning || $self->opts->critical) { + $self->set_thresholds(warning => $self->opts->warning, + critical => $self->opts->critical); + my $before = $self->{numOfPeers} - scalar(@{$self->{delta_found_peerNameList}}) + scalar(@{$self->{delta_lost_peerNameList}}); + # use own delta_numOfPeers, because the glplugin version treats + # negative deltas as overflows + $self->{delta_numOfPeers} = $self->{numOfPeers} - $before; + if ($self->opts->units && $self->opts->units eq "%") { + my $delta_pct = $before ? (($self->{delta_numOfPeers} / $before) * 100) : 0; + $self->add_message($self->check_thresholds($delta_pct), + sprintf "%.2f%% delta, before: %d, now: %d", $delta_pct, $before, $self->{numOfPeers}); + $problem = $self->check_thresholds($delta_pct); + } else { + $self->add_message($self->check_thresholds($self->{delta_numOfPeers}), + sprintf "%d delta, before: %d, now: %d", $self->{delta_numOfPeers}, $before, $self->{numOfPeers}); + $problem = $self->check_thresholds($self->{delta_numOfPeers}); + } + if (scalar(@{$self->{delta_found_peerNameList}}) > 0) { + $self->add_ok(sprintf 'found: %s', + join(", ", @{$self->{delta_found_peerNameList}})); + } + if (scalar(@{$self->{delta_lost_peerNameList}}) > 0) { + $self->add_ok(sprintf 'lost: %s', + join(", ", @{$self->{delta_lost_peerNameList}})); + } + } else { + if (scalar(@{$self->{delta_found_peerNameList}}) > 0) { + $self->add_warning(sprintf '%d new bgp peers (%s)', + scalar(@{$self->{delta_found_peerNameList}}), + join(", ", @{$self->{delta_found_peerNameList}})); + $problem = 1; + } + if (scalar(@{$self->{delta_lost_peerNameList}}) > 0) { + $self->add_critical(sprintf '%d bgp peers missing (%s)', + scalar(@{$self->{delta_lost_peerNameList}}), + join(", ", @{$self->{delta_lost_peerNameList}})); + $problem = 2; + } + $self->add_ok(sprintf 'found %d bgp peers', scalar (@{$self->{peers}})); + } + if ($problem) { # relevant only for lookback=9999 and support contract customers + $self->valdiff({name => 'bgppeerlist', lastarray => 1, freeze => 1}, + qw(peerNameList numOfPeers)); + } else { + $self->valdiff({name => 'bgppeerlist', lastarray => 1, freeze => 2}, + qw(peerNameList numOfPeers)); + } + $self->add_perfdata( + label => 'num_peers', + value => scalar (@{$self->{peers}}), + ); + } elsif ($self->mode =~ /peer::status/) { + if (scalar(@{$self->{peers}}) == 0) { + $self->add_unknown('no peers'); + return; + } + # es gibt + # kleine installation: 1 peer zu 1 as, evt 2. as als fallback + # grosse installation: n peer zu 1 as, alternative routen zum provider + # n peer zu m as, mehrere provider, mehrere alternativrouten + # 1 ausfall on 4 peers zu as ist egal + my $as_numbers = {}; + foreach (@{$self->{peers}}) { + $_->check(); + if (! exists $as_numbers->{$_->{aristaBgp4V2PeerRemoteAs}}->{peers}) { + $as_numbers->{$_->{aristaBgp4V2PeerRemoteAs}}->{peers} = []; + $as_numbers->{$_->{aristaBgp4V2PeerRemoteAs}}->{availability} = 100; + } + push(@{$as_numbers->{$_->{aristaBgp4V2PeerRemoteAs}}->{peers}}, $_); + } + if ($self->opts->name2) { + $self->clear_ok(); + $self->clear_critical(); + if ($self->opts->name2 eq "_ALL_") { + $self->opts->override_opt("name2", join(",", keys %{$as_numbers})); + } + foreach my $as (split(",", $self->opts->name2)) { + my $asname = ""; + if ($as =~ /(\d+)=(\w+)/) { + $as = $1; + $asname = $2; + } + if (exists $as_numbers->{$as}) { + my $num_peers = scalar(@{$as_numbers->{$as}->{peers}}); + my $num_ok_peers = scalar(grep { $_->{aristaBgp4V2PeerFaulty} == 0 } @{$as_numbers->{$as}->{peers}}); + my $num_admdown_peers = scalar(grep { $_->{aristaBgp4V2PeerAdminStatus} eq "stop" } @{$as_numbers->{$as}->{peers}}); + $as_numbers->{$as}->{availability} = 100 * $num_ok_peers / $num_peers; + $self->set_thresholds(warning => "100:", critical => "50:"); + $self->add_message($self->check_thresholds($as_numbers->{$as}->{availability}), + sprintf "%d from %d connections to %s are up (%.2f%%%s)", + $num_ok_peers, $num_peers, $asname ? $asname : "AS".$as, + $as_numbers->{$as}->{availability}, + $num_admdown_peers ? sprintf(", but %d are admin down and counted as up!", $num_admdown_peers) : ""); + } else { + $self->add_critical(sprintf 'found no peer for %s', $asname ? $asname : "AS".$as); + } + } + } + if ($self->opts->report eq "short") { + $self->clear_ok(); + $self->add_ok('no problems') if ! $self->check_messages(); + } + } else { + $self->no_such_mode(); + } +} + + +package Classes::Arista::ARISTABGP4V2MIB::Component::PeerSubsystem::Peer2; +our @ISA = qw(Monitoring::GLPlugin::SNMP::TableItem); +use strict; +use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 }; + +sub finish { + my ($self) = @_; + my @tmp_indices = @{$self->{indices}}; + my $last_tmp = scalar(@tmp_indices) - 1; + $self->{aristaBgp4V2PeerInstance} = $tmp_indices[0]; + shift @tmp_indices; + $self->{aristaBgp4V2PeerRemoteAddrType} = $self->mibs_and_oids_definition( + 'INET-ADDRESS-MIB', 'InetAddressType', $tmp_indices[0]); + shift @tmp_indices; + + $self->{aristaBgp4V2PeerRemoteAddr} = $self->mibs_and_oids_definition( + 'INET-ADDRESS-MIB', 'InetAddressMaker', + $self->{aristaBgp4V2PeerRemoteAddrType}, @tmp_indices); + + # aristaBgp4V2PeerLocalAddr kann ein Leerstring sein + ##$self->{aristaBgp4V2PeerLocalAddr} = $self->mibs_and_oids_definition( + ## 'INET-ADDRESS-MIB', 'InetAddress', + ## $self->{aristaBgp4V2PeerLocalAddr}, $self->{aristaBgp4V2PeerType}) if $self->{aristaBgp4V2PeerLocalAddr}; + $self->{aristaBgp4V2PeerLocalAddr} = "999.999.999.999" if ! $self->{aristaBgp4V2PeerLocalAddr}; + + $self->{aristaBgp4V2PeerLastError} |= "00 00"; + my $errorcode = 0; + my $subcode = 0; + if (lc $self->{aristaBgp4V2PeerLastError} =~ /([0-9a-f]+)\s+([0-9a-f]+)/) { + $errorcode = hex($1) * 1; + $subcode = hex($2) * 1; + } + $self->{aristaBgp4V2PeerLastError} = $Classes::Arista::ARISTABGP4V2MIB::Component::PeerSubsystem::errorcodes->{$errorcode}->{$subcode}; + $self->{aristaBgp4V2PeerRemoteAsName} = ""; + $self->{aristaBgp4V2PeerRemoteAsImportant} = 0; # if named in --name2 + $self->{aristaBgp4V2PeerFaulty} = 0; + my @parts = gmtime($self->{aristaBgp4V2PeerFsmEstablishedTime}); + $self->{aristaBgp4V2PeerFsmEstablishedTime} = sprintf ("%dd, %dh, %dm, %ds",@parts[7,2,1,0]); + + if ($self->{aristaBgp4V2PeerRemoteAddrType} eq "ipv6") { + $self->{aristaBgp4V2PeerRemoteAddrCompact} = $self->compact_v6($self->{aristaBgp4V2PeerRemoteAddr}); + $self->{aristaBgp4V2PeerLocalAddrCompact} = $self->compact_v6($self->{aristaBgp4V2PeerLocalAddr}); + } else { + $self->{aristaBgp4V2PeerRemoteAddrCompact} = $self->{aristaBgp4V2PeerRemoteAddr}; + $self->{aristaBgp4V2PeerLocalAddrCompact} = $self->{aristaBgp4V2PeerLocalAddr}; + } +} + +sub check { + my ($self) = @_; + if ($self->opts->name2) { + foreach my $as (split(",", $self->opts->name2)) { + if ($as =~ /(\d+)=(\w+)/) { + $as = $1; + $self->{aristaBgp4V2PeerRemoteAsName} = ", ".$2; + } else { + $self->{aristaBgp4V2PeerRemoteAsName} = ""; + } + if ($as eq "_ALL_" || $as == $self->{aristaBgp4V2PeerRemoteAs}) { + $self->{aristaBgp4V2PeerRemoteAsImportant} = 1; + } + } + } else { + $self->{aristaBgp4V2PeerRemoteAsImportant} = 1; + } + if ($self->{aristaBgp4V2PeerState} eq "established") { + $self->add_ok(sprintf "peer %s (AS%s) state is %s since %s", + $self->{aristaBgp4V2PeerRemoteAddr}, + $self->{aristaBgp4V2PeerRemoteAs}.$self->{aristaBgp4V2PeerRemoteAsName}, + $self->{aristaBgp4V2PeerState}, + $self->{aristaBgp4V2PeerFsmEstablishedTime} + ); + } elsif ($self->{aristaBgp4V2PeerAdminStatus} eq "stop") { + # admin down is by default critical, but can be mitigated + $self->add_message( + defined $self->opts->mitigation() ? $self->opts->mitigation() : + $self->{aristaBgp4V2PeerRemoteAsImportant} ? WARNING : OK, + sprintf "peer %s (AS%s) state is %s (is admin down)", + $self->{aristaBgp4V2PeerRemoteAddr}, + $self->{aristaBgp4V2PeerRemoteAs}.$self->{aristaBgp4V2PeerRemoteAsName}, + $self->{aristaBgp4V2PeerState} + ); + $self->{aristaBgp4V2PeerFaulty} = + defined $self->opts->mitigation() && $self->opts->mitigation() eq "ok" ? 0 : + $self->{aristaBgp4V2PeerRemoteAsImportant} ? 1 : 0; + } else { + # aristaBgp4V2PeerLastError may be undef, at least under the following circumstances + # aristaBgp4V2PeerRemoteAsName is "", aristaBgp4V2PeerAdminStatus is "start", + # aristaBgp4V2PeerState is "active" + $self->add_message($self->{aristaBgp4V2PeerRemoteAsImportant} ? CRITICAL : OK, + sprintf "peer %s (AS%s) state is %s (last error: %s)", + $self->{aristaBgp4V2PeerRemoteAddr}, + $self->{aristaBgp4V2PeerRemoteAs}.$self->{aristaBgp4V2PeerRemoteAsName}, + $self->{aristaBgp4V2PeerState}, + $self->{aristaBgp4V2PeerLastError}||"no error" + ); + $self->{aristaBgp4V2PeerFaulty} = $self->{aristaBgp4V2PeerRemoteAsImportant} ? 1 : 0; + } +} + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Classes/Arista.pm new/check_nwc_health-7.11/plugins-scripts/Classes/Arista.pm --- old/check_nwc_health-7.10.3/plugins-scripts/Classes/Arista.pm 2020-03-20 14:55:38.413405700 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Classes/Arista.pm 2020-05-21 22:07:57.453515000 +0200 @@ -19,6 +19,20 @@ $self->analyze_and_check_mem_subsystem("Classes::HOSTRESOURCESMIB::Component::MemSubsystem"); } elsif ($self->mode =~ /device::ha::/) { $self->analyze_and_check_ha_subsystem("Classes::Arista::Component::HaSubsystem"); + } elsif ($self->mode =~ /device::bgp/) { + if ($self->implements_mib('ARISTA-BGP4V2-MIB')) { + $self->analyze_and_check_interface_subsystem("Classes::Arista::ARISTABGP4V2MIB::Component::PeerSubsystem"); + } else { + $self->establish_snmp_secondary_session(); + if ($self->implements_mib('ARISTA-BGP4V2-MIB')) { + $self->analyze_and_check_interface_subsystem("Classes::Arista::ARISTABGP4V2MIB::Component::PeerSubsystem"); + } else { + # na laeggst me aa am ooosch + $self->establish_snmp_session(); + $self->debug("no ARISTA-BGP4V2-MIB, fallback"); + $self->no_such_mode(); + } + } } else { $self->no_such_mode(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Classes/Cisco/CISCOREMOTEACCESSMONITORMIB/Component/VpnSubsystem.pm new/check_nwc_health-7.11/plugins-scripts/Classes/Cisco/CISCOREMOTEACCESSMONITORMIB/Component/VpnSubsystem.pm --- old/check_nwc_health-7.10.3/plugins-scripts/Classes/Cisco/CISCOREMOTEACCESSMONITORMIB/Component/VpnSubsystem.pm 2020-03-20 14:55:39.118947200 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Classes/Cisco/CISCOREMOTEACCESSMONITORMIB/Component/VpnSubsystem.pm 2020-05-21 22:07:58.123830600 +0200 @@ -11,11 +11,8 @@ crasGlobalBwUsage crasNumDeclinedSessions crasThrMaxFailedAuths crasNumTotalFailures + crasIPSecNumSessions crasIPSecCumulateSessions )); -# $self->get_snmp_tables('CISCO-REMOTE-ACCESS-MONITOR-MIB', [ -# ['sessions', 'crasSessionTable', 'Classes::Cisco::CISCOREMOTEACCESSMONITORMIB::Component::VpnSubsystem::Session'], -# [ 'failures', 'crasSessFailTable', 'Classes::Cisco::CISCOREMOTEACCESSMONITORMIB::Component::VpnSubsystem::Failure'], -# ]); } sub check { @@ -112,6 +109,31 @@ value => $self->{delta_crasNumTotalFailuresRate}, places => 2, ); + + $self->valdiff({name => "crasIPSecCumulateSessions"}, qw(crasIPSecCumulateSessions)); + $self->set_thresholds(metric => "sessions_per_sec", + warning => -1, critical => -1); + my($sessions_per_sec_w, $sessions_per_sec_c) = + $self->get_thresholds(metric => "sessions_per_sec"); + if ($sessions_per_sec_w ne "-1" || $sessions_per_sec_c ne "-1") { + # one customer has serious problems when vpn connections are freezing + # a symptom is the number of sessions is constant over some minutes + # where there should be always an up and down. + # This part of the code is only executed if + # there is a --criticalx sessions_per_sec=0.001: + $sessions_per_sec_w = "0:" if $sessions_per_sec_w eq "-1"; + $sessions_per_sec_c = "0:" if $sessions_per_sec_c eq "-1"; + $self->set_thresholds(metric => "sessions_per_sec", + warning => $sessions_per_sec_w, critical => $sessions_per_sec_c); + $self->add_info(sprintf "total connections incrrease rate is %.5f/s", + $self->{crasIPSecCumulateSessions_per_sec}); + $self->add_message($self->check_thresholds(metric => "sessions_per_sec", + value => $self->{crasIPSecCumulateSessions_per_sec})); + $self->add_perfdata(label => "sessions_per_sec", + value => $self->{crasIPSecCumulateSessions_per_sec}, + places => 4, + ); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Classes/Cisco/WLC.pm new/check_nwc_health-7.11/plugins-scripts/Classes/Cisco/WLC.pm --- old/check_nwc_health-7.10.3/plugins-scripts/Classes/Cisco/WLC.pm 2020-03-20 14:55:39.390251300 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Classes/Cisco/WLC.pm 2020-05-21 22:07:58.416721300 +0200 @@ -26,8 +26,10 @@ $self->analyze_and_check_mem_subsystem("Classes::Cisco::IOS::Component::MemSubsystem"); } } elsif ($self->mode =~ /device::wlan/) { + $self->select_lwapp_ha_version(); $self->analyze_and_check_wlan_subsystem("Classes::Cisco::WLC::Component::WlanSubsystem"); } elsif ($self->mode =~ /device::ha::/) { + $self->select_lwapp_ha_version(); $self->analyze_and_check_wlan_subsystem("Classes::Cisco::WLC::Component::HaSubsystem"); } else { $self->no_such_mode(); @@ -41,3 +43,19 @@ return $self->{agentInventorySysDescription}." ".$self->{agentInventoryMachineModel}; } } + +sub select_lwapp_ha_version { + my ($self) = @_; + $self->require_mib('CISCO-LWAPP-HA-MIB'); + if ($self->implements_mib('CISCO-LWAPP-HA-MIB::2017')) { + $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB'} = + $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB::2017'}; + $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB'} = + $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB::2017'}; + } else { + $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB'} = + $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB::2012'}; + $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB'} = + $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB::2012'}; + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Classes/Cisco.pm new/check_nwc_health-7.11/plugins-scripts/Classes/Cisco.pm --- old/check_nwc_health-7.10.3/plugins-scripts/Classes/Cisco.pm 2020-03-20 14:55:39.399254700 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Classes/Cisco.pm 2020-05-21 22:07:58.426720100 +0200 @@ -35,8 +35,14 @@ if ($self->implements_mib('CISCO-BGP4-MIB', 'cbgpPeer2Table')) { $self->analyze_and_check_interface_subsystem("Classes::Cisco::CISCOBGP4MIB::Component::PeerSubsystem"); } else { - $self->debug("no CISCO-BGP4-MIB and/or no cbgpPeer2Table, fallback"); - $self->no_such_mode(); + $self->establish_snmp_secondary_session(); + if ($self->implements_mib('CISCO-BGP4-MIB', 'cbgpPeer2Table')) { + $self->analyze_and_check_interface_subsystem("Classes::Cisco::CISCOBGP4MIB::Component::PeerSubsystem"); + } else { + $self->establish_snmp_session(); + $self->debug("no CISCO-BGP4-MIB and/or no cbgpPeer2Table, fallback"); + $self->no_such_mode(); + } } } elsif ($self->mode =~ /device::eigrp/) { if ($self->implements_mib('CISCO-EIGRP-MIB')) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Classes/UPNP/AVM.pm new/check_nwc_health-7.11/plugins-scripts/Classes/UPNP/AVM.pm --- old/check_nwc_health-7.10.3/plugins-scripts/Classes/UPNP/AVM.pm 2020-03-20 14:55:41.152477500 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Classes/UPNP/AVM.pm 2020-05-21 22:08:00.206770300 +0200 @@ -4,21 +4,8 @@ sub init { my ($self) = @_; - if ($self->{productname} =~ /(7390|7490)/) { - bless $self, 'Classes::UPNP::AVM::FritzBox7390'; - $self->debug('using Classes::UPNP::AVM::FritzBox7390'); - } elsif ($self->{productname} =~ /7490/) { - bless $self, 'Classes::UPNP::AVM::FritzBox7390'; - $self->debug('using Classes::UPNP::AVM::FritzBox7390'); - } elsif ($self->{productname} =~ /7590/) { - bless $self, 'Classes::UPNP::AVM::FritzBox7390'; - $self->debug('using Classes::UPNP::AVM::FritzBox7390'); - } elsif ($self->{productname} =~ /6490/) { - bless $self, 'Classes::UPNP::AVM::FritzBox7390'; - $self->debug('using Classes::UPNP::AVM::FritzBox7390'); - } elsif ($self->{productname} =~ /7412/) { - bless $self, 'Classes::UPNP::AVM::FritzBox7390'; - $self->debug('using Classes::UPNP::AVM::FritzBox7390'); + if ($self->{productname} =~ /(7390|7490|7580|7590|6490|7412)/) { + $self->rebless('Classes::UPNP::AVM::FritzBox7390'); } else { $self->no_such_model(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Makefile.am new/check_nwc_health-7.11/plugins-scripts/Makefile.am --- old/check_nwc_health-7.10.3/plugins-scripts/Makefile.am 2020-03-20 14:55:41.192482500 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Makefile.am 2020-05-21 22:08:00.244382900 +0200 @@ -15,6 +15,7 @@ ../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/AIRESPACEWIRELESSMIB.pm \ ../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ALARMMIB.pm \ ../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/ARUBATCMIB.pm \ ../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ASYNCOSMAILMIB.pm \ @@ -414,6 +415,7 @@ Classes/Netgear.pm \ Classes/Lantronix.pm \ Classes/Lantronix/SLS.pm \ + Classes/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm \ Classes/Arista/Component/EnvironmentalSubsystem.pm \ Classes/Arista.pm \ Classes/Riverbed/SteelheadEX/Component/EnvironmentalSubsystem.pm \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/check_nwc_health-7.10.3/plugins-scripts/Makefile.in new/check_nwc_health-7.11/plugins-scripts/Makefile.in --- old/check_nwc_health-7.10.3/plugins-scripts/Makefile.in 2020-03-20 14:55:41.202476400 +0100 +++ new/check_nwc_health-7.11/plugins-scripts/Makefile.in 2020-05-21 22:08:00.254383100 +0200 @@ -257,6 +257,7 @@ ../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/AIRESPACEWIRELESSMIB.pm \ ../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ALARMMIB.pm \ ../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/ARUBATCMIB.pm \ ../GLPlugin/lib/Monitoring/GLPlugin/SNMP/MibsAndOids/ASYNCOSMAILMIB.pm \ @@ -657,6 +658,7 @@ Classes/Netgear.pm \ Classes/Lantronix.pm \ Classes/Lantronix/SLS.pm \ + Classes/Arista/ARISTABGP4V2MIB/Components/PeerSubsystem.pm \ Classes/Arista/Component/EnvironmentalSubsystem.pm \ Classes/Arista.pm \ Classes/Riverbed/SteelheadEX/Component/EnvironmentalSubsystem.pm \