SNMP trap translation
Posted: Tue May 01, 2012 11:22 pm
I've been trying to improve our SNMP trap translation recently and thus far I've managed to make the situation both much better and much worse, but I could probably make this go a whole lot faster with the advice of some one who's more familiar with SNMPTT. My last hurdle is ALL of my traps are currently displaying like this:
/etc/snmp/snmptrapd.conf
/etc/init.d/snmptrapd
/etc/snmp/confs/APC.conf
/etc/snmp/snmptt.ini
Rather than the values I'm seeing the short names, this is one of the easier to understand ones... some are just long strings of shortnames. Below are the relevant configs as they stand now:APC UPS: Communication lost: Communication lost between the agent and the UPS. / mtrapargsString.0 (OCTETSTR):UPS: Lost the local network management interface-to-UPS communication.
/etc/snmp/snmptrapd.conf
Code: Select all
disableAuthorization yes
traphandle default /usr/local/sbin/snmpttCode: Select all
OPTIONS="-On -p /var/run/snmptrapd.pid -Lf /var/log/net-snmpd.log"
..
daemon --pidfile=$pidfile /usr/sbin/snmptrapd $OPTIONSCode: Select all
EVENT communicationLost .1.3.6.1.4.1.318.0.1 "Status Events" Critical
FORMAT APC UPS: Communication lost: Communication lost between the agent and the UPS.
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "APC UPS: Communication lost: Communication lost between the agent and the UPS."
SDESC
Critical: Communication to the UPS has been lost. Steps
to reestablish communication are in progress.
Variables:
1: mtrapargsString
EDESC
Code: Select all
net_snmp_perl_enable=1
net_snmp_perl_best_guess=2
translate_log_trap_oid=0
translate_value_oids=1
translate_enterprise_oid_format=1
translate_trap_oid_format=1
translate_varname_oid_format=1
translate_integers=1
mibs_environment = ALL
dynamic_nodes=0
description_mode=0
description_clean=1
exec_enable=1
pre_exec_enable=1
exec_escape=1