Howtos:snmp

From NagiosCommunity

Jump to: navigation, search

Nagios SNMP Monitoring

This section is meant for brief writeups about monitoring various services using SNMP

Description Contributor Language Format
Monitoring Lotus/Domino Servers Using SNMP Ajitabh Pandey English HTML
Monitoring APC Smart UPS Sebastian Broekhoven English Howtos:snmp-apc-smart-ups
Monitoring Windows Components Sebastian Broekhoven English Howtos:snmp-windows
Performance Tips
Always use numerical OIDs

If your using snmp checks. Always use numerical OIDs! Otherwise at every running snmpcheck the OID has to be translated. This causes the libraries to load the MIBs from /usr/share/snmp/mibs and translate them.

A simple example:

nagios:~# time /usr/lib/nagios/plugins/check_snmp -H 127.0.0.1 -o DISMAN-EVENT-MIB::sysUpTimeInstance -C public
SNMP OK - Timeticks: (1425327110) 164 days, 23:14:31.10 | DISMAN-EVENT-MIB::sysUpTimeInstance=Timeticks: (1425327110) 164 days, 23:14:31.10

real    0m0.087s
user    0m0.072s
sys     0m0.012s
nagios:~# time /usr/lib/nagios/plugins/check_snmp -H 127.0.0.1 -o .1.3.6.1.2.1.1.3.0 -C public
SNMP OK - Timeticks: (1425327911) 164 days, 23:14:39.11 | iso.3.6.1.2.1.1.3.0=Timeticks: (1425327911) 164 days,  23:14:39.11

real    0m0.008s
user    0m0.004s
sys     0m0.004s

NOTE: add a -m MIBDEFINITION to the check to get output that is readable. Example:
Without -m
./check_snmp -H localhost -C public -o .1.3.6.1.4.1.2272.1.13.5.1.4.16.1 -r 5 -l StgPortState
StgPortState OK - 5
With -m
./check_snmp -H localhost -C public -o .1.3.6.1.4.1.2272.1.13.5.1.4.16.1 -r 5 -l StgPortState -m RAPID-CITY
StgPortState OK - forwarding(5)
The above clearly shows you the port is "forwarding". That makes alot more sense than "5".

Personal tools