nv-l
[Top] [All Lists]

Re: Need advise writing SNMP Automated Action script

To: nv-l@lists.tivoli.com
Subject: Re: Need advise writing SNMP Automated Action script
From: Art DeBuigny <debuigny@dallas.net>
Date: Tue, 26 Oct 1999 08:59:13 -0500
Eli;

You might try creating a little program on your server that tail's the
traps.log looking for the specific OID of the trap, and then parsing the
results so you can get that MIB leaf.  Your script might have a system
call to a command such as

tail -f /usr/OV/log/trapd.log | grep sdlcLSOperEntry.sdlcLSOperState

Then you can parse this string.  If you loop it correctly, it can run
continuously in the background, only going active when that trap hits
your box.  Then, you can either store the resulting mib query, or route
it back into NetView somehow.

Good luck!

Art DeBuigny
Bank of America Network Operations
debuigny@dallas.net

Eli Gal wrote:
>
> I need to add an Automatic Action shell-script to trapd.conf. The script
> needs to retrieve (via snmpget) a specific entry in the object's locIfDescr
> private MIB table.
> My problem is that the only reference to the specific offset in the
> locIfDescr table is mentioned by the "MIB leafs" of the trap, thus I don't
> know how to pass it as a parameter to my script.
>
> As an example, the following are the arguments passed by the trap. In this
> specific example, I need to snmpget locIfDescr.49
> How do I pass this 49 pointer to my script?
>
> ----------------
> Mon Oct 25 12:17:20 1999 Cisco_3660_Router u Trap: generic 6 specific 3 args
> (8):
>  [1] sdlcLSOperEntry.sdlcLSOperState.49.193 (Integer): 1
>  [2] sdlcLSAdminEntry.sdlcLSAdminState.49.193 (Integer): 2
>  [3] sdlcLSOperEntry.sdlcLSOperLastFailTime.49.193 (Ticks): 173453925
>  [4] sdlcLSOperEntry.sdlcLSOperLastFailCause.49.193 (Integer): 4
>  [5] sdlcLSOperEntry.sdlcLSOperLastFailFRMRInfo.49.193 (OctetString):
>  [6] sdlcLSOperEntry.sdlcLSOperLastFailCtrlIn.49.193 (OctetString): F1
>  [7] sdlcLSOperEntry.sdlcLSOperLastFailCtrlOut.49.193 (OctetString): 71
>  [8] sdlcLSOperEntry.sdlcLSOperLastFailREPLYTOs.49.193 (Counter): 82070
>
> -------
> Eli Gal - elig@bezeq.com
> Bezeq - the Israeli Telecommunications Corp.
> Ramat Gan, Israel
> tel: +972-3-5.763.763
> fax: +972-3-5.763.793


<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web