Got it working, thanks Dave and Mike. It was executing all the time, just
couldn't see the output. Had it write to a file and all is well ....
-- Joel Parker
----- Original Message ----
From: Joel Parker <[EMAIL PROTECTED]>
To: Dave Shield <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Thursday, January 24, 2008 8:34:15 AM
Subject: Re: Trap Handle directive not working
It looks like it matched but, I still do not see the output from my
hello world executable, which is owned by root and has 777 permissions
1970-01-01 11:27:38 192.168.2.201(via 192.168.2.201) TRAP, SNMP v1, community
public
SNMPv2-SMI::enterprises.2682.1.2 Enterprise Specific Trap (8001)
Uptime: 17:26:05.75
SNMPv2-MIB::sysDescr.0 = STRING: NetGuardian v3.1D.0001
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-SMI::enterprises.2682.1.2.1.4.0 = STRING: "01-01-2000
17:25:58.07" SNMPv2-SMI::enterprises.2682.1.2.5.1.1.99.1.1.1 =
INTEGER: 99 SNMPv2-SMI::enterprises.2682.1.2.5.1.2.99.1.1.1 =
INTEGER: 1 SNMPv2-SMI::enterprises.2682.1.2.5.1.3.99.1.1.1 =
INTEGER: 1 SNMPv2-SMI::enterprises.2682.1.2.5.1.4.99.1.1.1 =
INTEGER: 1 SNMPv2-SMI::enterprises.2682.1.2.5.1.5.99.1.1.1 = STRING:
"DOOR OPEN" SNMPv2-SMI::enterprises.2682.1.2.5.1.6.99.1.1.1 =
STRING: "Alarm"
trace: netsnmp_get_traphandler(): snmptrapd_handlers.c, 430:
snmptrapd: get_traphandler matched (20270)
trace: command_handler(): snmptrapd_handlers.c, 774:
snmptrapd: command_handler
trace: command_handler(): snmptrapd_handlers.c, 775:
snmptrapd: token = '/usr/sbin/hello hello'
trace: netsnmp_ds_set_boolean(): default_store.c, 191:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace: command_handler(): snmptrapd_handlers.c, 803:
snmptrapd: execute format
Any ideas ? I changed the hello code to print to stderr and still nothing.
-- Joel Parker
----- Original Message ----
From: Dave Shield <[EMAIL PROTECTED]>
To: Joel Parker <[EMAIL PROTECTED]>
Cc: [email protected]
Sent: Thursday, January 24, 2008 3:04:56 AM
Subject: Re: Trap Handle directive not working
On 23/01/2008, Joel Parker <[EMAIL PROTECTED]> wrote:
> SNMPv2-SMI::enterprises.2682.1.2 Enterprise Specific Trap
(8001)
> traphandle .1.3.6.1.4.1.2682.1.2.8001 /usr/sbin/hello hello
> traphandle SNMPv2-SMI::enterprises.2682.1.2.8001 /usr/sbin/hello
hello
Those two have the wrong OID.
> traphandle .1.3.6.1.4.1.2682.1.2.0.8001 /usr/sbin/hello hello
That's the correct OID for the trap listed above.
I'd agree with Mike that it's worth trying with a more recent release.
The 5.1.x line is no longer being supported. (Though this sort of
basic
operation should work).
It's worth checking the permissions on the 'hello' binary,
and whether it reads in the information passed it on stdin.
You might also try running snmptrapd with debugging turned on
(-Dsnmptrapd) and see whether that gives some indication what
might be going wrong.
Dave
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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