[ First - *please* don't mail me privately, without copying any responses to the mailing list. I don't have the time or inclination to offer private, unpaid, SNMP consultancy. Keep discussions to the list, where others can both learn and offer advice. Thanks. ]
[misi wrote: >Dave Shield <[EMAIL PROTECTED]> írta: > >Hi, >I have read the manual page called snmptrapd.conf, snmptrapd, >snmp.conf, and some more. >I made a configuration file: >/etc/snmp/snmptrapd.conf > >It contains the following: >traphandle RSASPPALT_MIB::ibmSpTrapAppS >/usr/lib/nagios/plugins/runme.sh 26 > >I can see in the logfile (/var/log/messages) the snmp trap >datagram, but the handled script can not display arguments >from traphandler daemon. > Please re-read the snmptrapd.conf man page: traphandle OID|default PROGRAM [ARGS ...] The traphandle configuration directive configures the snmptrapd program to launch an external program any time it receives a trap matching the OID token.... The program is fed details about the trap to its standard input ^^^^^^^^^^^^^^^^^^^^^ Note - standard input, not command-line arguments >It can only display the number "26". This is an errorcode >for this OID. >I tried to remove the "26" argument, and restarted the >snmptrapd. >It could not display the information from datagram. > >runme.sh can only to echo the arguments: >echo INFORMATION: >echo $1 >echo $2 >echo $3 > >Does not work. > Correct. Because the script isn't called that way. Try something like: echo INFORMATION read one ; echo $one read two ; echo $two read three ; echo $three >I tried to use this: >traphandle RSASPPALT_MIB::ibmSpTrapAppS /bin/cat >and >traphandle RSASPPALT_MIB::ibmSpTrapAppS /bin/echo > >I was not succeeded to get information. > >How could I make snmptrapd to give information me? > By following the specification :-) [Sorry, low blow!] Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users