Re: Newbie needing help e-mailing traps

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/3/18 Dan Nolan <[email protected]>:
> I have net-snmp installed on my Fedora 9 box.  I understand that I need
> snmptrapd for what I'm looking to do.  I found the "traptoemail" script and
> put this line in my snmptrapd.conf file:
>
> traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s
> SMTPSERVER]b ADDRESSES

That is explaining the syntax of the command - what options are
available and what bits can go where.   It's not intended as a literal
string to be placed in the snmptrapd.conf file as is.


> I'm just really confused on how to put it all together and make it actually
> work.

The simplest form would probably be:

   traphandle  default  /usr/local/bin/traptoemail  [email protected]

That should send an email message to "[email protected]"
for every trap that arrives, regardless of what that trap actually represents.

The "TRAPOID" token is an alternative to "default", used for selecting
special handling for particular traps.    The -f and -s options are used
to configure exactly how email should be sent.
   But to start with, I'd suggest you try with the simple example above.


> Here is my snmptrapd.conf file:
>
>
> authCommunity log,execute,net public

That's good.

> traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s
> SMTPSERVER]b ADDRESSES

See above

I'd then delete the rest of the file - all of the directives are missing
essential parameters.
   Don't worry about them yet - start with *just* the two lines listed
above, and get that working first.  Then you can start experimenting
with other formats, and additional trap handles.

Dave

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
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.