Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have to configure SNMP trap receiver to handle traps from a particular device (in this case it is a IBM TS3584 Tape Library) and send them over (as e-mail) with the information about the error. My server is running CentOS 6.4 linux, with net-snmp package.

I have connected to the library and I am able to receive its test trap. Additionaly I've downloaded the MIBs for this device (from here: http://www-01.ibm.com/support/docview.wss?uid=ssg1S4000318), and verified that I can get the values (or OID) of a particular event:

snmpwalk -v2c -c public -m +IBM-TS3500-MIBv2 10.10.100.5 ibm3584MIBObjectsTD
**IBM-TS3500-MIBv1::ibm3584MIBObjectsTD.0 = STRING: "This is a test SNMP trap."**


snmptranslate -m +IBM-TS3500-MIBv2 -IR -On ibm3584MIBObjectsTD
**.1.3.6.1.4.1.2.6.182.1.2.71.1**

The whole trap (from /var/log/messages) looks like this:

2013-08-27 15:49:37 10.10.100.5(via UDP: [10.10.100.5]:1795->[10.10.100.135]) TRAP,
SNMP v1, community public#012#011SNMPv2-SMI::enterprises.4484.1 Enterprise Specific
Trap (408) Uptime: 1:00:10.45#012#011SNMPv2-SMI::enterprises.2.6.182.1.2.11.1 =
STRING: "3584 L32 7814014"#011SNMPv2-SMI::enterprises.2.6.182.1.2.111.1 = STRING: "
0"#011SNMPv2-SMI::enterprises.2.6.182.1.2.101.1 = ""#011SNMPv2
SMI::enterprises.2.6.182.1.2.41.1 = STRING: "08"#011SNMPv2
SMI::enterprises.2.6.182.1.2.71.1 = STRING: "This is a test SNMP trap."#011SNMPv2
SMI::enterprises.2.6.182.1.2.151.1 = INTEGER: 1#011SNMPv2
SMI::enterprises.2.6.182.1.2.161.1 = STRING: "00000"

My question is: is there any software (linux, non gui) which can handle the traps received in this format and basing on the severity (which is one value in the SNMP trap) send an e-mail using the informations provided in a trap? I've tried Cacti, but I couldn't find any notification options (except an old plugin with no documentation), and although I managed cacti to speak with my device (reading its name/location etc.) its useless. AFAIK Nagios has the plugin for TS3200/3300 Libraries, but I can't use Nagios.

So I'm thinking if I have to write my own parser tailing /var/log/messages for snmp traps and search for the informations or is there any solution I can use?

share|improve this question
add comment

1 Answer

Update2: http://www.net-snmp.org/docs/man/snmptrapd.html Search for more.

Update: net-snmp trap receiver snmptrapd.

http://net-snmp.sourceforge.net/tutorial/tutorial-5/demon/

Do you want a full monitoring system that can handle traps? If so, try Opennms. It is the most mature of the open source monitoring products.

share|improve this answer
    
Thanks for the tip. I don't need a full monitoring system for now, but I will sure dig into Opennms - maybe it will be handy in the future. For now I need to parse these particular traps and (in case of error) send e-mail containing the information from the trap. EDIT: Yes, I am using snmptrapd right now to capture the trap, but I don't know how to pass it, as the documentation in the link you provided for snmptrapd is not yet written. EDIT2: Yes, I've read this man page, but I didn't find any useful information regarding my problem. –  Ziwi Aug 27 '13 at 15:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.