check_snmp and octet strings


#1

Hi there,

I am using Nagios to monitor Smartbridge airPoint devices, which use snmpv1.

When I query an oid for the statisticsWireless it returns a structure in the form of an octet string, e.g:-

root@collen:/usr/local/nagios/etc# …/libexec/check_snmp -H 10.68.1.92 -o 1.3.6.1.4.1.410.1.2.3.1.0
SNMP OK - 37 81 01 00 4D E5 00 00 BD EC 00 00 E2 62 4D 00 79 93 01 00 00 00 00 00 00 00 00 00 AD 9E 01 00
E6 C8 19 00 F9 65 00 00 00 00 00 00 E5 91 01 00
00 00 00 00 00 00 00 00 B5 09 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 1C 00 00 00
9F 95 00 00 84 00 00 00

Any idea how I can decode this or access the structure, as it is the only way to obtain information about signal strength and so forth.

Thanks,

Tim


#2

i’d try an snmpwalk on some other OIDs… possibly you’ll find the values already in human readable form…
If not i think you should try on some more technical forum for the particular hardware your using or some Newsgroup…

Luca


#3

First, you should always use the -m option with check_snmp, it’s much faster that way. Otherwise, the check has to look through all of your installed MIB’s in /usr/share/snmp/mibs/ to find the oid. By using -m it will use THAT mib and execute in < 1 sec.

Second, if you are queriing a device for an oid, isn’t it YOU that should be telling us what that OID should return and what the value of that query’s result should be? How did you know to query that oid? If you view the mib for that oid, it should tell you what that oid result should return.

For example:
I query a device that supports MIB “Wellfleet-HARDWARE-MIB” with the oid of ".1.3.6.1.4.1.18.3.1.1.4"
Return values can be 1, 2, or 3 which mean OK, fail, notpresent. All of that info can be found by reading the MIB file, or by looking at the oid in a MIB browser like mbrowse.

Do a google for mbrowse and install it. It sounds like you need it.


#4

Hi jakkedup,

Thanks for the tip with the -m flag.

The device I am trying to query is a smartBridge airPoint wireless bridge. It uses snmpv1 and I had to google for a while to work out that it uses the Atmel mib.

I found the oid’s on oidview.com/mibs/410/ATMEL-MIB.html and that is where I knew to query 1.3.6.1.4.1.410.1.2.3.1. I would normally expect it to return a specific value like you said, this is how all the other MIB’s seem to work, however this one returns a block of octets.

I found this guidebook for the Atmel MIB mail-archive.com/smartbridge … 08647.html which says the 1.3.6.1.4.1.410.1.2.3.1 oid returns a structure which contains the stats I need but I have no idea how to get these values out using snmp … or am I not supposed to?

Thanks for your help on this one,

Tim


#5

it appears that you should add a .1 through .22 to the end of your oid so that let’s say I query oid
1.3.6.1.4.1.410.1.2.3.1.2 then the value returned will be an octet value of the BroadcastTransmittedPacets. You could then use that value in any way you choose to use it. Perhaps graph the data.