2009/11/8 rangeli nepal <rangeli.ne...@gmail.com>: > So i put a command in snmpd.conf like this: > > extend .1.3.6.1.4.1.3658.50 dhcpd_partner_down /root/dhcpd_partner_down.sh > It worked for me. I can see > > snmpwalk localhost -c public -v 2c .1.3.6.1.4.1.3658.50 > > SNMPv2-SMI::enterprises.3658.50.1.0 = INTEGER: 1 > SNMPv2-SMI::enterprises.3658.50.2.1.2.18.100.104.99.112.100.95.112.97.114.116.110.101.114.95.100.111.119.110 > = STRING: "/root/dhcpd_partner_down.sh" > SNMPv2-SMI::enterprises.3658.50.2.1.3.18.100.104.99.112.100.95.112.97.114.116.110.101.114.95.100.111.119.110 > = ""
Try using "extend dhcpd_partner_down /root/dhcpd_partner_down.sh" instead, and then run snmpwalk -v 2c -c public localhost nsExtendObjects That will give you essentially the same output, but with a proper MIB file to display it in a sensible fashion. (In particular, to interpret the index to the table properly). You should then be able to see where this long OID is coming from. > Is it ok to see this kind of output? Yes. > now I put following lines setup a monitor for this oid. > > trapcommunity traprus > trapsink localhost 162 > trap2sink localhost 162 > informsink localhost 162 Why do you want three copies of every trap? Typically, you should use "trapsink" OR "trap2sink" OR "informsink". Not all three. > monitor -r 60 -o .1.3.6.1.4.1.3658.5000 "Partner Down" > SNMPv2-SMI::enterprises.3658.50.3.1.4.18.100.104.99.112.100.95.112.97.114.116.110.101.114.95.100.111.119.110 > != 0 Try using monitor -r 60 -o .1.3.6.1.4.1.3658.5000 "Partner Down2" SNMPv2-SMI::enterprises.3658.50.3.1.4 != 0 or, if you're using the version of extend without an explicit root OID, try monitor -r 60 -o .1.3.6.1.4.1.3658.5000 "Partner Down2" nsExtendResult != 0 > However this never generates any trap. I was wondering if I am doing > someting wrong? What do you see if you run "snmpwalk ... SNMPv2-SMI::enterprises.3658.50.3.1.4 " (or "snmpwalk .... nsExtendResult", as appropriate)? What exit value does your dhcpd_partner_down.sh script return? Dave ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ 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