nv-l
[Top] [All Lists]

[nv-l] Map color and trap severity.

To: nv-l@lists.us.ibm.com
Subject: [nv-l] Map color and trap severity.
From: James Shanks <jshanks@us.ibm.com>
Date: Fri, 20 Aug 2004 09:15:18 -0400
Delivery-date: Fri, 20 Aug 2004 14:33:28 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com

Alejandro,

I don't know very much about GTM and I don't quite know what to tell you
about using the published APIs.  Everything I would have to offer is
already in  the books, including what information there is about the trap
interface, and you might as well read it for yourself.  The only other

person I know who has GTM experience says that most people who use GTM
do so with C programming using the APIs, just as Jason suggested.  That
does not mean you cannot do what you want this way, only that there
are is not a lot of other experience to guide you.

Having said that, no matter how an object on the map was created,
you should be able to change it's map status with the NetView status trap.

You can change the map status of any NetView object using the status trap,
provide you have the read-write map open and nvevents was started by the ovw
that opened that map.  Here's an example right from the Admin Guide:

#!/bin/ksh
set -x
NAME=$1
STATE=$2
/usr/OV/bin/snmptrap `hostname` .1.3.6.1.4.1.2.6.3.1 \
`hostname` 6 58916871 1 \
.1.3.6.1.4.1.2.6.3.1.1.2.0 Integer 14 \
.1.3.6.1.4.1.2.6.3.1.1.3.0 OctetString $NAME \
.1.3.6.1.4.1.2.6.3.1.1.4.0 OctetString "Object status is" \
.1.3.6.1.4.1.2.6.3.1.1.5.0 OctetString $STATE

Basically, you pass this script the Selection Name of the object you want
to alter as the first parm and the status you want it to have as the
second.   When nvevents on UNIX sees the trap, he makes the change. That's
why the map must be opened read-write and nvevents started by the same
process which opened it -- nvevents needs read-write map access. The other

varbinds  are required as shown.  The first must be an integer decimal 14
and the third must be an octet string which says "Object status is".
The only status you cannot set with this method is "Unmanage" because
that state is not really a status, but a condition which applies to
the object and not to the map.

There is one more "gotcha" to this, that you probably don't have to worry
about, but I feel compelled to mention it anyway..  If you want to
directly set the status of objects which normally inherit their status
from objects underneath them (such objects have a status source of
"Compound Propagated") then there is one more thing to do, which is to
edit /usr/OV/app-defaults/Nvevents (or make a local copy of it in $HOME
and edit that) so that it says,
       nvevents.overrideCompoundStatus : True
That allows nvevents to change the status source to "Symbol" so that he
can then set it.
You can determine the status source of any object on the map with a right
click and then select Edit --> Modify/Describe --> Symbol and it will tell
you the value in the panel that comes up.


Hope this helps

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

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

Archive operated by Skills 1st Ltd

See also: The NetView Web