Re: DisMan & monitor

rangeli nepal <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
THANK YOU. Life is beautiful and your suggestion made it.

I followed your suggestion about configuration change and it works. However
still I have some questions :)

I changed extend without oid. Now it has rationale oids instead of weird
looking oids.

NET-SNMP-EXTEND-MIB::nsExtendNumEntries.0 = INTEGER: 1
NET-SNMP-EXTEND-MIB::nsExtendCommand."dhcpd_partner_down" = STRING:
/root/dhcpd_partner_down.sh
NET-SNMP-EXTEND-MIB::nsExtendArgs."dhcpd_partner_down" = STRING:
.....
...
 I am using just trap2sink. I think it is v2c complaint and I am getting
traps.

You suggested :

 monitor -r 60 -o  .1.3.6.1.4.1.3658.5000  "Partner Down2"
nsExtendResult  != 0

I think you meant,  nsExtendObjects instead of  .1.3.6.1.4.1.3658.5000?

My last question,

If I have couple more scripts to monitor ( suppose a.sh,b.sh...).  I will
use "extend" command.

Now how "monitor" command will distinguish them?
I am guessing it should from the name. e.g on snmpwal I get


NET-SNMP-EXTEND-MIB::nsExtendCommand."dhcpd_partner_down" = STRING:
/root/dhcpd_partner_down.sh

thus dhcpd_partner_down is the string that will distinguish it from string
associated wih a.sh ( suppost dns_down).

However I am not sure. Would you please confirm it.?

Thanks again.
rn







On Mon, Nov 9, 2009 at 3:29 AM, Dave Shield <[email protected]>wrote:

> 2009/11/8 rangeli nepal <[email protected]>:
> > 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
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.