The contents of the trap is passed to the script in STDIN so your script will need to read from there. Or, to parse everything, you can use: traphandle default /usr/local/bin/ I believe the configuration file is /etc/snmp/nf.įor example, you can use: traphandle IBM-TS3500-MIBv1::ibm3584MIBObjectsTD.0 /usr/local/bin/ You can configure snmptrapd to handle traps with a script this is the traphandle directive. 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? AFAIK Nagios has the plugin for TS3200/3300 Libraries, but I can't use Nagios.
PERL SNMP TRAP RECEIVER SOFTWARE
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. SNMP v1, community public#012#011SNMPv2-SMI::enterprises.4484.1 Enterprise Specific
Snmptranslate -m +IBM-TS3500-MIBv2 -IR -On ibm3584MIBObjectsTD **IBM-TS3500-MIBv1::ibm3584MIBObjectsTD.0 = STRING: "This is a test SNMP trap."** Additionaly I've downloaded the MIBs for this device (from here: ), 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 I have connected to the library and I am able to receive its test trap. My server is running CentOS 6.4 linux, with net-snmp package.
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.