Re: Customizing Traps - Variable for Hostname on Generic SNMP Tra p

1999-11-29 14:16:53
Subject: Re: Customizing Traps - Variable for Hostname on Generic SNMP Tra p
From: "Mull, John" <jmull AT HERSHEYS DOT COM>
To: nv-l AT lists.tivoli DOT com
Date: Mon, 29 Nov 1999 14:16:53 -0500

Thanks for the response.  Mapping $AGENT_ADDR to my TEC slot value by itself
works perfectly. The IP address maps correctly to the new TEC slot value.

However for some reason the other variable values such as nv_var1 are being
nulled out on my TEC event when I add this new slot.  Also, I attempted to
use the PRINTF function in the format I used in the tecad_nv6k.cds file with
no success.  Both the new slot value and other variable slots were empty.

I will keep testing, any other thoughts let me know.

Thanks again for your help.

John Mull
Hershey Foods

Generic SNMP traps do not contain a hostname as a variable.

You might be able to use the agent address, which would be an IP address,
as part of the trap.  And as I just appended this morning, you can reference
that value in your slot mapping in trapd.conf as $AGENT_ADDR.  I think you
should still be able to use the PRINTF function in the slot map to combine
with another variable, but I have not tried that, so perhaps not.

James Shanks
Tivoli (NetView for UNIX) L3 Support

"Mull, John" <jmull AT HERSHEYS DOT COM> on 11/24/99 11:04:26 AM

Please respond to Discussion of IBM NetView and POLYCENTER Manager on

cc:    (bcc: James Shanks/Tivoli Systems)
Subject:  Customizing Traps - Variable for Hostname on Generic SNMP Trap

Hi Netview Admins,

Environment : Tivoli Netview for Unix V5.1.1 (Solaris 2.6)
                 Tivoli Enterprise Console V3.6.1 (Solaris 2.6)
*NOTE* - Separate Servers

We pass Netview events using the internal adapter to TEC.  Using the TEC
rulebase engine we send events to our trouble ticket system for 2nd level
support if certain conditions are met.  The problem I am trying to solve is
with the generic SNMP traps (Link_Down/Link_UP) for our enterprise switches

In the case where I know a device such as a Server connected to the switch
will be down for maintenance, it is nice to have a "maintenance rule" in
place to ignore the events for the switch port.  In order to place the
switch port under maintenance it is necessary to create a slot value that is
unique which will be used to identify the global variable in the Tivoli
rule.  When we were using Netview V4.1.2 sending events with the external
adapter (tecad_nv6k) I was able to use the PRINTF function in the
tecad_snmp.cds file to create a new slot value which I called hostport.  I
then appended hostname and interface_index to the slot which in all cases
created the unique port which I could use to put under maintenance.

Using the Event Configuration panels now to do the same work in v5.1.1,   I
am having difficulty getting the append to work for the new slot value.  For
the generic class Link Down the variable for the port index is nv_var1.  I
can't seem to determine what the hostname variable is in the SNMP trap.  For
the netmon events hostname  is nv_var2, but this does not hold true for the
SNMP trap.
Any suggestions or ideas are appreciated.