SNMP Classification

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
talha.beg
Posts: 1
Joined: Mon Nov 14, 2011 10:16 am

SNMP Classification

Post by talha.beg »

Hi,

My solution includes a linux machine with Nagios core installed on it and a network switch. The network switch is set to send SNMP traps to the linux machine. The Nagios sees the SNMP traps since check_snmp plugin is installed fine and working.



So basically, I want to monitor a network switch. This switch has the capability to send SNMP traps. Now, for checking the SNMP traps, the Nagios Documentation shows the following:

define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0
}
In the check_command directive of the service definition above, the "-C public" tells the plugin that the
SNMP community name to be used is "public" and the "-o sysUpTime.0" indicates which OID should be
checked.

Now, the OID I want to check is .1.3.6.1.4.1.15397.2.1.104.21.3.
I tried replacing the "-o sysUpTime.0" with the OID above but it is not working.
The error I get is No OIDs specified. Am I missing something?
Secondly, what significance does the use generic-service hold?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: SNMP Classification

Post by jsmurphy »

Part of the problem is you've attempted to set up passive monitoring from the switch and active monitoring from the actual Nagios server.

If you wish to use passive monitoring (SNMP Traps) then you will need to investigate snmptrapd and snmptt
- http://nagios.sourceforge.net/docs/3_0/ ... hecks.html
- http://xavier.dusart.free.fr/nagios/en/snmptraps.html

If you wish to actively monitor (SNMP queries), you will need to make sure of the following:
- Log on to the switch and ensure that the snmp read community string is 'public' or whatever it is you wish to use.
- Ensure that SNMP is allowed by the ACL's on the device if applicable.

If you decide to go with active, you can test that it's configured properly by using the snmpwalk command from the linux box :)
Locked