Snmpwalk command not returning all values

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Brick
Posts: 26
Joined: Thu Aug 29, 2013 6:02 am

Snmpwalk command not returning all values

Post by Brick »

I am running a Nagios Core 3.2.3 server on Opensuse Linux and I am attempting to obtain snmp results from an esx 3.5 server

I am trying to use the snmpwalk walk command to return a list of snapshot sizes but it only returns a single value.

This is the shell command on the ESX server-

snmp_snapshots.sh

Code: Select all

/usr/bin/find /vmfs/volumes/ -name '*delta*.vmdk' -printf %f' '%s'\n' 
When I run it manually on the ESX box this is the return I get-

Code: Select all

testnag01-000001-delta.vmdk 16840704
testnag01-000002-delta.vmdk 167835648
testnag01-000003-delta.vmdk 151058432
So it looks like that bit is working fine.

however- when I run the following command on the Nagios server-

Code: Select all

/usr/bin/snmpwalk -v 2c -c public 10.10.0.20 .1.3.6.1.4.1.6876.57.101.2
It only returns a single value, and weirdly, its the second one-

Code: Select all

SNMPv2-SMI::enterprises.6876.57.101.2 = STRING: "testnag01-000002-delta.vmdk 167835648"
Any ideas why this isn't working?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Snmpwalk command not returning all values

Post by sreinhardt »

Well it does seem to be working, as that is the second disk in your set. try it without the trailing .2, like this:

Code: Select all

/usr/bin/snmpwalk -v 2c -c public 10.10.0.20 .1.3.6.1.4.1.6876.57.101
Also, thanks for using code tags and such! I moved this to the nagios core forum as NSTI is a separate product.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Brick
Posts: 26
Joined: Thu Aug 29, 2013 6:02 am

Re: Snmpwalk command not returning all values

Post by Brick »

Thanks a million sreinhardt, that has fixed the problem AND given me a ton of insight into how OID's actually work!!!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Snmpwalk command not returning all values

Post by sreinhardt »

Thank you for the note that it worked! You are welcome, glad I could help and be informative!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked