Page 1 of 1

SNMP Query

Posted: Mon Aug 01, 2011 6:03 am
by Malcz86
I'm trying to setup Nagios to monitor SNMP from our BES server. We've got three different mail stores that it access's and I'm trying to use SNMP to display total amount of users from each store by using the BLACKBERRYSERVERMIB-SMIV2 and the below OID's.

besMailServerHealthTotalUsers.23 (1.3.6.1.4.1.3530.5.26.1.10.23)
besMailServerHealthTotalUsers.24 (1.3.6.1.4.1.3530.5.26.1.10.24)
besMailServerHealthTotalUsers.25 (1.3.6.1.4.1.3530.5.26.1.10.25)

I can snmpwalk these fine from the linux command prompt but I can not snmpget them which is what Nagios is trying to do. This isn't really a Nagios problem but I figured there may be some SNMP wizz's here. So any suggestions?

Re: SNMP Query

Posted: Mon Aug 01, 2011 10:08 am
by nscott
Malcz,

Try this. You'll need to do this in your /usr/local/nagios/libexec directory

./check_snmp -H <BES Server Address> -C <community string> -o besMailServerHealthTotalUsers.23 -w <warning val> -c <critical val>

If you're using SNMPv3 you'll have to add the necessary -a, -A, -x, -X values.

Re: SNMP Query

Posted: Mon Aug 01, 2011 10:29 am
by Malcz86
Same as running the snmpget command,
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.2.10.136:161 besMailServerHealthTotalUsers.23

Re: SNMP Query

Posted: Mon Aug 01, 2011 10:36 am
by nscott
Hm, thats what it says when the OID is not entered properly. Are you absolutely sure the OID is properly typed in?

Re: SNMP Query

Posted: Mon Aug 01, 2011 11:15 am
by Malcz86
Yes, the command I'm running is
snmpget -v 2c -m +BLACKBERRYSERVERMIB-SMIV2 -c LONSVWIN207 10.2.10.136 1.3.6.1.4.1.3530.5.26.1.10.23
If I walk this command instead
snmpwalk -v 2c -m +BLACKBERRYSERVERMIB-SMIV2 -c $community$ $host$ 1.3.6.1.4.1.3530.5.26.1.10.23
The correct information is displayed. I suspect the issue is linux thinks theres multiple OID's under 1.3.6.1.4.1.3530.5.26.1.10.23 when in fact there's only one. I've tried getting around this by adding a .0 but with no joy.

Re: SNMP Query

Posted: Tue Aug 02, 2011 4:34 pm
by nscott
Does that particular OID have a name attached, or is that all you can get?

Re: SNMP Query

Posted: Wed Aug 03, 2011 3:35 am
by Malcz86
The name is,

besMailServerHealthTotalUsers.23

but I just tried walking and getting this and it behaves exactly the same as the numbers.