Check_nwc_health -- Use of uninitialized value in multiplication (*)

(Monitor Junkie) #1

Hello,

I have 10 Cisco IOS routers.
For memory query I use the check_nwc_health (here version 5.11).
Unfortunately 4 routers have problem:

check_nwc_health’ ‘–hostname’ ‘xx.xx.xx.xx’ ‘–community’ ‘unwichtig’ ‘–mode’ ‘memory-usage’ -vvv

BlockquoteI am a Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.5(3)S5, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright © 1986-2017 by Cisco Systems, Inc.
Compiled Thu 19-Jan-17 09:28 by mcpre
Use of uninitialized value in multiplication (*) at /usr/lib64/nagios/plugins/check_nwc_health line 22093.
Use of uninitialized value in addition (+) at /usr/lib64/nagios/plugins/check_nwc_health line 22093.
Use of uninitialized value in sprintf at /usr/lib64/nagios/plugins/check_nwc_health line 22101.
Use of uninitialized value in pattern match (m//) at /usr/lib64/nagios/plugins/check_nwc_health line 22103.
Use of uninitialized value in string eq at /usr/lib64/nagios/plugins/check_nwc_health line 22111.
Use of uninitialized value in string eq at /usr/lib64/nagios/plugins/check_nwc_health line 22119.
Use of uninitialized value in concatenation (.) or string at /usr/lib64/nagios/plugins/check_nwc_health line 22127.
Use of uninitialized value in concatenation (.) or string at /usr/lib64/nagios/plugins/check_nwc_health line 22133.
Use of uninitialized value in concatenation (.) or string at /usr/lib64/nagios/plugins/check_nwc_health line 22137.
[MEMSUBSYSTEM]
info: checking mems
[MEM_1]
ciscoMemoryPoolFree: 1357924984
ciscoMemoryPoolType: 0
type: 0
usage: 0
info: mempool usage is 0.00%
[MEMSUBSYSTEM]
components: HASH(0x35cd660)
OK - mempool usage is 0.00%
checking mems
mempool usage is 0.00% | ‘_usage’=0%;80;90;0;100

I also tried Check Version 7.10 … and the same mistake

Blockquote
Use of uninitialized value in multiplication (*) at /usr/lib64/nagios/plugins/check_nwc_health.7.10.0.5 line 61201.
Use of uninitialized value in addition (+) at /usr/lib64/nagios/plugins/check_nwc_health.7.10.0.5 line 61201.

Does anyone have idea??

#2

Showing line 61201 would have been a start:

$self->{usage} = 100 * $self->{ciscoMemoryPoolUsed}

Looking at the line
'ciscoMemoryPoolUsed' => '1.3.6.1.4.1.9.9.48.1.1.1.5'
I’d try to check whether the OID returns a valid value.

(Monitor Junkie) #3

Thank you very much ,

I have to find OID with snmpwalk
Here’s the result:

memory usage - Working:

snmpwalk -v2c -c wichtig xx.xx.xx.02 1.3.6.1.4.1.9.9.48
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.1 = STRING: “Processor”
SNMPv2-SMI::enterprises.9.9.48.1.1.1.3.1 = INTEGER: 0
SNMPv2-SMI::enterprises.9.9.48.1.1.1.4.1 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.1 = Gauge32: 322621312
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 1365542416
SNMPv2-SMI::enterprises.9.9.48.1.1.1.7.1 = Gauge32: 1048575908

memory usage - not working:

snmpwalk -v2c -c wichtig xx.xx.xx.01 wichtig 1.3.6.1.4.1.9.9.48
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 1357924784

SNMPWalk can not find anymore.
Where is the problem?
SNMP Community Permission?

Thx

#4

Probably something like a different firmware version so OIDs might have changed. You get some information so permissions seem to be right.
I’d try to compare version numbers between routers.