Hi Nicolas.

Nicolas Schubhan wrote:
Hello,
this is my snmptrapd.conf file :

   traphandle .1.3.6.1.4.1.17962.5.1 /bin/touch /reussi
   traphandle .1.3.6.1.4.1.17962 /bin/touch /zdn
   traphandle default /bin/touch /rater

this is my log file :

2005-05-04 18:18:07 NET-SNMP version 5.2.1 Started.
2005-05-04 18:18:08 mercedes.zandan-2003.com [172.168.1.44] (via UDP: 
[172.168.1.154]:1314) TRAP, SNMP v1, community public
        SNMPv2-SMI::enterprises.17962 Enterprise Specific Trap (1) Uptime: 
0:00:00.00
        SNMPv2-SMI::enterprises.17962.5.1 = STRING: "172.168.1.154"     
SNMPv2-SMI::enterprises.17962.5.0 = STRING: "Inserer Alive"
...

My problem :
If I have the line traphandle .1.3.6.1.4.1.17962 /bin/touch /zdn
the file '/zdn' is make,
if i comment it, the file '/rater' is make by default,
But in the log the OID is ...17962.5.1, and when i receive this I want to do something.
Do you understand where is my problem ?
Can i catch my specific number of the trap .1.3.6.1.4.1.17962 ?

Quoting Dave Shield from a month ago in this list:

**
If you're talking about a TRAP-TYPE definition,
then this would actually be:

    traphandle {snmpTrapEnterprise}.0.{N} command

where {snmpTrapEnterprise} is the enterprise OID
from the TRAP-TYPE, and N is the specific trap value
(a single integer).

If you're talking about a NOTIFICATION-TYPE definition,
then it would be

  traphandle {snmpTrapOID} command

where {snmpTrapEnterprise} is the enterprise OID of
the notification.  The fact that this is received
as an SNMPv1 trap makes no difference.  The traphandle
directive works with SNMPv2-style notation throughout.
**

Based on the syslog output you provided above, try using:

traphandle .1.3.6.1.4.1.17962.0.1 /bin/touch /reussi

...17962.5.1 is one of the variables passed, not the actual trap. The trap is the 'enterprise specific trap (1)' of the enterprise 17962.

Alex




------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ 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

Reply via email to