Page 1 of 1

Snmpwalk command not returning all values

Posted: Thu Aug 29, 2013 6:15 am
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?

Re: Snmpwalk command not returning all values

Posted: Thu Aug 29, 2013 11:17 am
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.

Re: Snmpwalk command not returning all values

Posted: Fri Aug 30, 2013 4:26 am
by Brick
Thanks a million sreinhardt, that has fixed the problem AND given me a ton of insight into how OID's actually work!!!

Re: Snmpwalk command not returning all values

Posted: Fri Aug 30, 2013 10:37 am
by sreinhardt
Thank you for the note that it worked! You are welcome, glad I could help and be informative!