Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_snmp_mem.pl fails with a specific device #80

Closed
stefangweichinger opened this issue Dec 1, 2021 · 4 comments
Closed

check_snmp_mem.pl fails with a specific device #80

stefangweichinger opened this issue Dec 1, 2021 · 4 comments

Comments

@stefangweichinger
Copy link

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

  • Version used (e.g. check_snmp_int.pl -V): 2.1.0
  • Perl version (perl -v): v5.32.1
  • Operating System and version: Debian GNU/Linux 11 (bullseye)
  • Monitoring system (e.g. icinga2 --version): icinga2 r2.12.3-1
  • Full command line executed by Icinga, if relevant: see above
@SteScho
Copy link
Owner

SteScho commented Dec 1, 2021

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants