2009/11/9 rangeli nepal <[email protected]>:
> 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?
Err... no. That wouldn't make sense.
The "monitor" line will look for instances of the 'nsExtendResult' object,
and any varbinds in the trap will have the same index value appended
to them. If you add the index value of an column object of a table, to
an internal structural OID, then you'll get a meaningless OID.
The only reason I suggested "-o .1.3.6.1.4.1.3658.500", is that you had
this in the original line. I didn't know why, so was reluctant to just
drop it. It sounds as if you don't know why it's there either, so I'll
follow my initial instincts.
Omit the '-o' option altogether - the standard trap varbinds should include
all the information you need to interpret the trap sensibly.
> 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?
The monitor command above will look for *any* non-zero value of
nsExtendResult, and trigger the corresponding trap. You don't
need to repeat this line for each one individually.
The monitor line will distinguish between them in exactly the
same way that the nsExtend tables do - using the (string)
index values.
> 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).
"dhcp_partner_down" is indeed the string that distinguishes this entry
from any others. But note that this is taken from the second field of
the "extend" line - *not* the name of the script itself.
Try with the line
extend random_name /root/dhcpd_partner_down.sh
and see how this affects the results of walking the nsExtend* tables.
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