I have recently found in the man page for snmptrapd.conf, the note that /usr/bin/traptoemail installs with NetSNMP, allowing you to easily set snmptrapd to email you traps that you receive. I have it working as follows:
contents of /etc/snmp/snmptrapd.conf:
-----
traphandle default /usr/bin/perl /usr/bin/traptoemail -s mymailserver.com -f [EMAIL PROTECTED] [EMAIL PROTECTED]
snippet of contents of /etc/init.d/snmptrapd: ----- OPTIONS="-Lo -p /var/run/snmptrapd.pid -c /etc/snmp/snmptrapd.conf"
These are the only options that I know of that are getting passed to snmptrapd at program startup. As far as I can tell, all traps should be being processed by this traptoemail, and they are.
The ONLY problem I see is that I'm getting 2 emails for every trap.. When I look in syslog (note, i recently changed -Lsd to -Lo, in the hope that this might fix it.. but it was set to -Lsd) it only shows one trap received. I can only figure that this script is somehow sending out to emails for each trap, or something, but I'm not a perl programmer and I'm apparently not smart enough to pull the answer out of thin air. Has anybody seen this, or has anybody ran into this and know a fix for this, as I'm assuming it's something simple and I'm just missing something.. thanks!
--
Gabriel Matthews (o\!/o)
Senior Network Support Technician
Cinergy Communications
[EMAIL PROTECTED] 866.311.0938
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-users mailing list [EMAIL PROTECTED] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
