Browsing SNMP
Server Training - Nagios

This command should show you the available OIDs (object identifiers) on a host.  This command is assuming that the host supports 2c and the public string.  It is important to understand why you use these OIDs, they will provide you with the information you need in order to monitor the features of the router.  For example, you will need to know the descriptive term used for the Ethernet port on the router.  Here is an example of two descriptive strings for different routers.  You will not want to just guess this information you want to search for it.

Basic Nagios Training PDF

IF-MIB::ifDescr.1 = STRING: enet0
IF-MIB::ifDescr.1 = STRING: Ethernet0

 

Lesson 2 | Lesson 4

 

 


snmpwalk <ip-address> -v 2c -c public
This will create a list of available information.  The list is long and can be confusing so this is why you may want to use a browser.

SNMPv2-MIB::sysDescr.0 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM R.22.01,JETDIRECT,JD95,EEPROM R.25.09,CIDATE 07/24/2003
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.11.2.3.9.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (40150) 0:06:41.50
SNMPv2-MIB::sysContact.0 = STRING:
SNMPv2-MIB::sysName.0 = STRING: NPIB15C1D
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 64
IF-MIB::ifNumber.0 = INTEGER: 2
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM R.22.01,JETDIRECT,JD95,EEPROM R.25.09
IF-MIB::ifDescr.2 = STRING: HP ETHERNET MULTI-ENVIRONMENT,ROM R.22.01,JETDIRECT,JD95,EEPROM R.25.09
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.2 = INTEGER: softwareLoopback(24)
IF-MIB::ifMtu.1 = INTEGER: 1500
IF-MIB::ifMtu.2 = INTEGER: 32768
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 4008636142
IF-MIB::ifPhysAddress.1 = STRING: 0:1:e6:b1:5c:1d
IF-MIB::ifPhysAddress.2 = STRING:
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.2 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: 75227
IF-MIB::ifInOctets.2 = Counter32: 0
IF-MIB::ifInUcastPkts.1 = Counter32: 801
IF-MIB::ifInUcastPkts.2 = Counter32: 0
IF-MIB::ifInNUcastPkts.1 = Counter32: 17
IF-MIB::ifInNUcastPkts.2 = Counter32: 0
IF-MIB::ifInDiscards.1 = Counter32: 0



mbrowse
If you would like to use a browser to view OIDs you can use mbrowse.  You need a machine with a graphical interface and the Xwindow in order to use it.  The package may be called “mbrowse” for Debian or “snmpbrowser” for CentOS in the rpmforge repository.  When you use mbrowse you can place a host and the login passwords to the read and write community strings.  The same directory structure is available using the browser for SNMP.

SNMP

When you select individual nodes you will be provided additional information in the box below by clicking the “Walk” button. You also can select the “Details” tab for more information.

Nagios

As you view this example you can see the ifEntry.IfMTU.1 size is 1500 showing your Ethernet0 MTU.  It is important that you wrestle with the methods of finding the information you want to monitor.