SNMP Trap Handling with Nagios
Francois Meehan
My company has been very successful in providing network-monitoring solutions
based on Nagios/Netsaint. For environments that required SNMP trap handling,
however, the technique suggested in Nagios's documentation was too cumbersome.
That technique requires coding for each individual trap message that needs to
be monitored and, for those clients, we could only suggest making use of commercial
solutions, all of which come with high price tags and complicated implementations.
Recently, however, we discovered Alex Burger's "SNMP Trap Translator" project
that extends Net-SNMP. Coupled with Risto Vaarandi's event correlation tool
called "SEC", a small Python script, and, of course, Nagios, we have put together
a very scalable, efficient alternative. The whole process is pictured in Figure
1.
Please note that we used Red Hat advanced server for this particular installation,
but this solution should be adaptable to other modern Linux distributions.
Pre-requisites:
1. Net-SNMP with snmptrapd configured.
2. SNMPTT, SNMP trap translator.
3. SEC -- Simple event correlator.
4. Nagios.
5. Mib definition files for the equipment or software you need to monitor.
One of the beauties of this solution is that we can use the event severity
set by the mib designer. Nagios will always report the event status based on
this information.
Net-SNMP
Net-SNMP, formally known as UCD-SNMP, is installed by default on most Linux
distributions. Here we are specifically interested in configuring the trap receiver
portion of the installation. The trap receiver is a daemon that receives its
startup configuration in /etc/rc.d/init.d/snmptrapd. We modified the following
line:
OPTIONS="-s -u /var/run/snmptrapd.p
|