Hi Dave,

I tried defining more than 2 traphandler in the snmptrapd.conf file for the 
same trap OID.  the result I get is very very instable to say at 
least.  Most of the times, I would only have the first handler get
called and then the trap daemon would quit with an "broken pipe" error. 
Sometimes it will call the 2nd or the 3rd handler.  But it never reached
the 4th one.  

The handler I defined is very simple, a basic shell script that writes to a 
file like the one I include.  

---------------------
#!/bin/bash

echo "Calling handler No. 1..." >> /tmp/trapout1
echo "returns from handler No. 1" >> /tmp/trapout1
---------------------

And here's what my snmptrapd.conf looks like: 

----------------------
traphandler 1.3.6.1.4.1.4682.900.1 handler1
traphandler 1.3.6.1.4.1.4682.900.1 handler2
traphandler 1.3.6.1.4.1.4682.900.1 handler3
traphandler 1.3.6.1.4.1.4682.900.1 handler4
-----------------------

Do you think this is bug in snmptrapd or something that I did was wrong? 
------------------------------------------------------------------------

Yixiong Zou ([EMAIL PROTECTED])

(626) 443-0100

All views expressed in this email are those of the individual sender. 



> -----Original Message-----
> From: Dave Shield [mailto:[EMAIL PROTECTED] 
> Sent: Friday, August 27, 2004 3:33 AM
> To: Zou, Yixiong
> Cc: [EMAIL PROTECTED]
> Subject: Re: How to define multiple trap handler? 
> 
> 
> 
> > How do I handle the situation that many applications are 
> interested in
> > the same trap?  Does the snmptrapd.conf allow me to define multiple 
> > trap handlers for the same trap? 
> 
> I believe so, yes.
> Suck it and see....
> 
> Dave
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id808&op=click
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to