Custom Trap handling
I use sitescan to monitor building health at the data center. I have it send traps to Nagios. Unfortunately those traps are not very good and the data requires manipulation before writing the trap to Nagios.
I made a copy of snmptraphandling.py to snmptraphandlingss.py. I then modified snmptt.conf and changed the line calling the script to the new filename and send over all important data. I then modified snmptraphandlingss.py to do what I need.
Example modification to snmptt.conf:
EVENT sitescanalert .126.96.36.199.4.1.7061.0.0 “Status Events” Normal
EXEC /usr/local/bin/snmptraphandlingss.py “$r” “SNMP Traps” “$s” “$@” “$-*” “$*”
A sitescan notification signifies
that there has been a change in the state of
a sitescan monitored device.