RE: snmptrapd traphandle traptoemail not working

"Seger, Mark" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <9FCE3A46FE7C8045A6207AE4B42E9F9A4A94D5EE6F@GVW1119EXC.americas.hpqcorp.net>
Wow, something even I can answer!  ;-)
You need to include 'execute' with your authCommunity line like this:

autoCommunity log,execute public

then it will log AND execute your traphandle

-mark

From: Dan Kingdon [mailto:[email protected]]
Sent: Friday, January 08, 2010 7:42 AM
To: [email protected]
Subject: snmptrapd traphandle traptoemail not working

Hi all,

This is my first time dabbling with the snmptrapd program.  I am using Ubuntu on a fairly unmodified snmp setup.

Just trying to set up a very basic email forwarder so that all snmp traps are sent via email to the administrators address.

The snmptrapd.conf I am using is

"
authCommunity log public
traphandle default /usr/bin/perl /usr/bin/traptoemail -s localhost -f <FROMADDRESS> <MYADDRESS>
"

I can see the traps being logged in the syslog when snmptrapd is running, but I do not receive any emails.

I have also tried the following test of the traptoemail script and received the email fine.

"(echo localhost; echo 127.0.0.1; echo snmpTrapOID oidValue ; echo sysUpTime 1) | /usr/bin/traptoemail -f <FROMADDRESS> -s localhost <MYADDRESS>"

I am now completely stuck, I have tried every variation I can find for the traphandle line and still nothing.

Is there anyway I can debug what snmptrapd is doing other that the default syslog output?

Thanks in advance.

Dan Kingdon

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.