Page 1 of 5

Custom SNMP check

Posted: Thu Jun 25, 2015 9:58 am
by angus
Good day,

I am very new to Nagios, we just purchased our license yesterday. I would like to monitor several items on my BlackBerry server. The BES plugins on the Nagios exchange are for BES5, I am using BES12, so these will not work. I have been studying the BES5 plugin in an attempt to learn the process. I understand I have to gather the MIB files from my BES server and import them into Nagios. I have done this. I have been using the iReasoning MIB Browser to look through the MID for OIDs I would like to monitor. I found a very basic example with OID .1.3.6.1.4.1.3530.7.7.35.120.15.1.2. I would like to test the output of this OID from Nagios. I am not sure what the next step is. I read through http://support.nagios.com/forum/viewtop ... =7&t=21512 but I am not sure how to attempt the snmpwalk. I tried the commands specified in the article from an SSH session on the Nagios server but I got a Time Out message.

Thanks for your help.

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 10:02 am
by tmcdonald
Timeout on a snmp walk usually means one of a few things:

- The remote machine is not listening on port 161 (either SNMP is not enabled or it is on a different port)
- Something (firewall, proxy, etc) is hindering communication
- The remote machine is not accepting connections from the Nagios IP
- You have the community string wrong

The last two options further assume that the device is configured to silently ignore the requests instead of outright denying them.

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 10:07 am
by ssax
SSH into your XI server and run these from the command line:
* Make sure to change community and X.X.X.X

To show the OIDs:

Code: Select all

snmpwalk -v 2c -c community X.X.X.X:161 .1.3.6.1.4.1.3530.7.7.35.120.15.1.2 -On
To show with the OIDs converted:

Code: Select all

snmpwalk -v 2c -c community X.X.X.X:161 .1.3.6.1.4.1.3530.7.7.35.120.15.1.2
To walk from the top:

Code: Select all

snmpwalk -v 2c -c community X.X.X.X:161 -On
You can also use snmpget:

Code: Select all

snmpget -v 2c -c community X.X.X.X:161 .1.3.6.1.4.1.3530.7.7.35.120.15.1.2

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 11:02 am
by angus
In order for the snmp to pull i will need to install the SNMP feature on the server correct?

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 11:18 am
by tgriep
Yes, you will need to enable SNMP on your system so the Nagios XI system can access it.

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 1:31 pm
by angus
Alrighty, I have response from the server now but each value is coming back NULL. I gave read only access to the approved IPs. Should i give write permissions?

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 3:01 pm
by angus
Attached is a crawl of the MIB. I see some oids that interest me but how can i figure out what they are? i right click and select "find in tree" but nothing happens. Does this make sense?

Re: Custom SNMP check

Posted: Thu Jun 25, 2015 4:55 pm
by ssax
Do you have the MIBs in /usr/share/snmp/mibs on your XI server? If so, you could run this command to get the friendly name:

Code: Select all

snmpwalk -v 2c -c community X.X.X.X:161 Y.O.U.R.M.I.B.O.I.D
Other than that you would most likely want to talk with Blackberry and see if they have any documentation on their MIBs.

Re: Custom SNMP check

Posted: Mon Jun 29, 2015 8:18 am
by angus
Ok, i have found a few OIDs that i want to monitor. From reading other posts i see the recommendation is to use single check_snmp service. I am trying to translate the SSH command to the XI service command line. Below is one of my attempts. What am i missing?

Thanks.

Re: Custom SNMP check

Posted: Mon Jun 29, 2015 8:30 am
by angus
Below is the command that works in the SSH session.

snmpget -v 2c -c "String" X.X.X.X:161 .1.3.6.1.4.1.3530.8.7.145.120.30.1.6.1.0.1