Custom SNMP check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Custom SNMP check

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Custom SNMP check

Post 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.
Former Nagios employee
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Custom SNMP check

Post 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
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Custom SNMP check

Post by angus »

In order for the snmp to pull i will need to install the SNMP feature on the server correct?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Custom SNMP check

Post by tgriep »

Yes, you will need to enable SNMP on your system so the Nagios XI system can access it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Custom SNMP check

Post 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?
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Custom SNMP check

Post 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?
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Custom SNMP check

Post 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.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Custom SNMP check

Post 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.
You do not have the required permissions to view the files attached to this post.
angus
Posts: 125
Joined: Thu May 28, 2015 8:17 am

Re: Custom SNMP check

Post 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
Locked