Re: unable to catch traps with a script

Thomas Anders <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Folkert van Heusden wrote:
> In /etc/snmp/snmptrapd.conf I have this:
> traphandle default /usr/local/sbin/my_script
> 
> where my_script is:
> #!/bin/sh
> 
> echo $* >> /tmp/snmp.log
> 
> Now if an event comes in, I only get empty lines(!) in my
> /tmp/snmp.log-file.

 From http://www.net-snmp.org/docs/man/snmptrapd.conf.html:

   The program is fed details about  the  notification  to  its
   standard input
   ^^^^^^^^^^^^^^


+Thomas

-- 
Thomas Anders (thomas.anders at blue-cable.de)


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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.