snmp testen met nagios

Nagios is een prachtige tool om het netwerk mee te monitoren, zeker in combinatie met groundwork, die er een mooie schil overheen gemaakt heeft.

Als je specifieke dingen wil monitoren, moet je echter met mibs etc aan de gang..  Vaak kun je dit het beste even testen op de commandline of je de juiste in-output hebt.  Hiervoor zijn 2 tools beschikbaar, snmpwalk en snmpget.

Hieronder volgt een beschrijving hoe deze te gebruiken…..

snmpwalk

usage:  snmpwalk -v 1 -c public <host> <OID>
-v is de snmp versie (1, 2c of 3)
-c is de snmp community (meestal is dit standaard "public")

voorbeeld: snmpwalk-v 1 -c public 192.168.1.15

snmpget

usage:  snmpwalk -v 1 -c public <host> <OID>

Object Identifier (OID)
The hardest part in all of this is the use of the Object Identifier or OID
Each SNMP detail has its own identification name called the OID
You dont have to worry much about this with much MBROWSE or SNMPWALK
However, with SNMPGET, you have to specify the exact OID you are looking for
In playing around with Mbrowse I discovered the LPR Queue name OID's for Canon and EFI devices are different
Canon Controllers LPR Queue name OID        enterprises.1602.1.3.3.1.9.3.0
EFI controllers LPR Queue name OID             enterprises.1602.1.3.3.51.9.1.1.2.IP.1
In the case of the EFI device you also have to replace IP with the TCP/IP address of the printer
So an iR600 with an IP address of 192.168.10.100 would have a LPR Queue name OID of enterprises.1602.1.3.3.51.9.1.1.2.192.168.10.100.1
Dont be scared if this appears to tricky, you can use MBROWSE or SNMPWALK instead