SteScho / manubulon-snmp

Set of Icinga/Nagios plugins to check hosts and hardware with the SNMP protocol.
GNU General Public License v2.0
73 stars 71 forks source link

check_snmp_mem.pl fails with a specific device #80

Closed stefangweichinger closed 2 years ago

stefangweichinger commented 2 years ago

Expected Behavior

Get correct memory values reported.

Current Behavior

I try this:

# /usr/lib/nagios/plugins/check_snmp_mem.pl -v -H 10.0.0.134 -C secret42 -2 -m -w90,90 -c95,95 
Alarm at 15
SNMP v2c login
Argument "noSuchObject" isn't numeric in addition (+) at /usr/lib/nagios/plugins/check_snmp_mem.pl line 580.
Argument "noSuchObject" isn't numeric in subtraction (-) at /usr/lib/nagios/plugins/check_snmp_mem.pl line 580.
Illegal division by zero at /usr/lib/nagios/plugins/check_snmp_mem.pl line 580.

Possible Solution

Maybe the implemented OIDs don't match the ones requested by the script?

Steps to Reproduce (for bugs)

  1. use icinga2 on Debian 11.1
  2. install this repo
  3. run above check

Your Environment

SteScho commented 2 years ago

Hi.

These normally happens when the system did not use the OID for memory as expected. What kind of device is your client 10.0.0.134? You should get more details just by adding the -v argument.

Greetings, Steffen

stefangweichinger commented 2 years ago

Unfortunately "-v" doesnt give anything, see my example. I will try to check the OIDs etc

The device is a HSM appliance of a rather young company, the implementation of SNMP is still quite raw.

stefangweichinger commented 2 years ago

I find these in snmpwalk:

.iso.3.6.1.2.1.25.2.3.1.3.1 = STRING: "Physical memory"
.iso.3.6.1.2.1.25.2.3.1.3.3 = STRING: "Virtual memory"
.iso.3.6.1.2.1.25.2.3.1.3.6 = STRING: "Memory buffers"
.iso.3.6.1.2.1.25.2.3.1.3.7 = STRING: "Cached memory"
.iso.3.6.1.2.1.25.2.3.1.3.8 = STRING: "Shared memory"
.iso.3.6.1.2.1.25.2.3.1.3.10 = STRING: "Swap space"

Would that help me to patch the script maybe? I assume I would have to look up the values as well, still learning ...

stefangweichinger commented 2 years ago

I solved it by using /usr/lib/nagios/plugins/check_snmp_storage.pl instead: the appliance has the RAM-related values there. thanks