nv-l
[Top] [All Lists]

Re: [nv-l] Ruleset to trigger action for interfaces with SNMP ifType 22

To: nv-l@lists.tivoli.com
Subject: Re: [nv-l] Ruleset to trigger action for interfaces with SNMP ifType 22
From: James Shanks <jshanks@us.ibm.com>
Date: Thu, 31 Oct 2002 09:49:19 -0500
I think you have answered your own question.   But let me elaborate a bit.

First, when developing a ruleset you should always use the nvcdebug trace 
function so you can see in the nvcorrd logs what happens when your ruleset 
encounters a trap.  The easiest thing to do is issue "nvcdebug -d all" 
before you test and "nvcdebug -r" (to turn tracing off again) after ward. 
In the log you will see an eye catcher "Received a Trap" and "Finished 
with the trap" for every trap that nvcorrd processes while the trace is 
on.  Everything that happens in between pertains to that trap.  There's no 
external doc on reading the trace but it is not too hard to follow. 

Second, the origin of the trap will not be an interface,  It will be the 
node which owns that interface. And the database query will be for the 
origin will be "ovobjprint -s <node_name>" where "node_name" is the 
origin.  Try it.  As you surmised, you will not see the ifType as a field 
on the node.    It is a property of the interface record and not the node 
record.   So to get it, you would have to query "ovobjprint -s 
<node_name:if_name".   That's going to be rather much harder to do.  The 
if_name will be used in the third variable of the trap, which is what 
normally displays in the events window, "Interface xxxx down" .  If you 
are going to use an action script anyway, then you could parse the name 
"xxxx" out of $NVATTR_3 and append it to $NVATTR_2 plus colon and do your 
own query.  Or you could do it in-line to precede a display (Forward). How 
you do it is up to you, but the bottom line is that none of the pre-built 
functions in the ruleset editor make this kind of thing simple.   The 
Query database field options don't permit you to take the interface name 
from one attribute and append it to the node name in the origin to do the 
kind of query that you want.  So you will have to get creative on your 
own.


James Shanks
Level 3 Support  for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group




Danny Lee <dannyl@ibk.com.au>
10/30/2002 11:31 PM
Please respond to dannyl

 
        To:     nv-l@lists.tivoli.com
        cc: 
        Subject:        [nv-l] Ruleset to trigger action for interfaces with 
SNMP ifType 22



Hello there Netview gurus,

    My environment is of the following:

    Tivoli Netview for Unix 7.1.2
    running on Solaris 8

I'm trying to create a simple ruleset using the Netview ruleset editor 
to run a script (Action) (or display to event window) when a an 
Interface down event is received from only certain type of interfaces 
(ie. serial interface, atm, etc).

My current ruleset looks like the following:

Event Stream (default action: block)
  |
  |
 v
Trap Settings (Enterprise: netview 6000, Event Name: IBM_NVIDWN_EV)
  |
  |
  v
Query Database Field (Field Name: SNMP ifType, Object ID Source: Origin, 
Comparison Type: "Equal To", Literal Value: 22)
  |
  |
  v
Forward


My logic here is that for all "Interface Down" event received, the 
interface in question will be queried for its SNMP ifType value in the 
database, and as long as it contains the value 22 (point to point 
serial), then the event will be forwarded to a dynamic workspace which 
I'm using to test this ruleset.  However, it doesn't seem to work.  Is 
this because the "Query Database Field" node is only designed to work 
with "Node" events rather than "interface" events?  Or am I missing 
something here?

Any help appreciated...

Thanks,
    Danny

-- 
=================================================================
Danny Lee                             ph: +61 408 887 141
IBK (Senetas Group)                   fax: +61 3 9820 2840
Level 1, 11 Queens Road               email: dannyl@ibk.com.au
Melbourne VIC   3004
Australia




---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
For additional commands, e-mail: nv-l-help@lists.tivoli.com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)





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

Archive operated by Skills 1st Ltd

See also: The NetView Web