SNMPTT - SNMP Trap Translator

Introduction

In my previous post, it was about Net-SNMP. If you use it for SNMP Trap, in most cases you will see the trap from the device (router, switch, server, ups, printer, etc) will be look like this, taken from snmptt website:

Feb 12 13:37:10 server11 snmptrapd[25409]: 192.168.110.192: Enterprise Specific Trap (3008) Uptime: 306 days, 23:13:24.29, .1.3.6.1.2.1.1.5.0 = SERVER08, .1.3.6.1.4.1.232.11.2.11.1.0 = 0, .1.3.6.1.4.1.232.3.2.3.1.1.4.8.1 = rebuilding(7)

or

Feb 12 13:37:10 server11 snmptrapd[25409]: 192.168.110.192: Enterprise Specific Trap (3008) Uptime: 306 days, 23:13:24.29, sysName.0 = SERVER08, cpqHoTrapFlags.0 = 0, cpqDaLogDrvStatus.8.1 = rebuilding(7)

This example is taken from  a Compaq cpqDa3LogDrvStatusChange trap. In the first example, the trap received by snmptrapd is in Numeric OIDs MIB Format. While the second example, we have ordered snmptrapd to use Symbolic OIDs.

Why don’t we translate it to more readable format. So the people at Network Monitoring Center could read it clearly and do the right act as soon as possible. Let say, the trap will become look like this:

Feb 12 13:37:13 server11 TRAPD: .1.3.6.1.4.1.232.0.3008 Normal “XLOGONLY” server08 - Logical Drive Status Change: Status is now rebuilding

With SNMPTT, we can translate from default SNMP Trap to the above messages easily. And depend on us, we can make it more informatif.

After the translation has been done, we can order SNMPTT to log the trap to text file, syslog, database (MySQL or PostgreSQL) and or if you use microsoft windows, you can create an event log. And for more advanced handling, you can make a custom program, either to send it to email, pager, sms or you want to process it a little bit.

Here is the diagram to understand SNMPTT better:

SNMPTT Flow Diagram

Quick Howto

As SNMPTT is developed using Perl, what you need is the Perl and some Perl modules. And if you read SNMPTT Documentation i’m sure you will easily install this software. Either in linux, unix, mac osx or windows. As it is a very complete documentation.

Download and Resources

  1. SNMPTT Website
  2. SNMPTT Documentation, also installation how to for linux, windows, unix.
  3. SNMPTT Download
  4. SNMP References

Leave a Reply