Hi

I use NET-SNMP to launch an external program when the
SNMPTRAPD received a trap.  I have configured my
snmptrapd.conf file with many traphandler directives,
each directive will call an external script
(handle-traps).

This  is my snmptrapd.conf file


############################
#Matriz E7 SNMP Traps
############################
#Enterprise Specific Trap (2)
traphandle SNMPv2-SMI::mib-2.17
/usr/local/nagios/libexec/eventhandlers/trap_handler 1
#Enterprise Specific Trap (419)
traphandle SNMPv2-SMI::enterprises.52
/usr/local/nagios/libexec/eventhandlers/ trap_handler
2
#Enterprise Specific Trap (419)
traphandle SNMPv2-SMI::enterprises.52.4.3.3.2.1.1.1.12
/usr/local/nagios/libexec/eventhandlers/ trap_handler
3

############################
#Itzanami
############################
#Link Up Trap (0)
traphandle SNMPv2-SMI::enterprises.311.1.1.3.1.1
/usr/local/nagios/libexec/eventhandlers/ trap_handler
4


When I defined the traphandlers, I used  the snmptrapd
log information. This is the log

2006-01-14 00:00:41 NET-SNMP version 5.1.3.1 Started.
2006-01-14 00:06:54 148.204.218.236(via
148.204.218.236) TRAP, SNMP v1,
community public
        SNMPv2-SMI::enterprises.311.1.1.3.1.1 Link Up Trap
(0) Uptime:
3:00:24.21
        IF-MIB::ifIndex.4 = INTEGER: 4

2006-01-14 00:12:22 148.204.218.100(via
148.204.218.100) TRAP, SNMP v1,
community public
        SNMPv2-SMI::enterprises.52 Enterprise Specific Trap
(419) Uptime:
1:28:26.06
        SNMPv2-SMI::enterprises.52.4.3.3.2.1.1.1.14 =
INTEGER: 14
SNMPv2-SMI::enterprises.52.4.3.3.3.1.1.1.14.1 =
INTEGER: 1


My problem is that my handle-traps script is never
called from my snmptrapd.conf, I think that the
problem could be the OID syntax is incorrect. I have
tested my configuration file by writing “default” in
the OID token of the directive traphandle and that
works for me (the handle-traps is called).

Can you tell me  whats wrong in my configuration file?

Another question that I have is what kind of
information can I obtain from the traps that the
daemon receives because in my handle-traps script I
need
variable called host.

Thanks in advance.


        
        
                
___________________________________________________________ 
Do You Yahoo!? 
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. 
http://net.yahoo.com.mx 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&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

Reply via email to