nv-l
[Top] [All Lists]

Re: [nv-l] How to populate hostname in TEC slot mapping

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] How to populate hostname in TEC slot mapping
From: Brandon Mitchell <bmitch3020@cox.net>
Date: Sat, 24 Apr 2004 08:19:49 -0400
Delivery-date: Sat, 24 Apr 2004 13:25:55 +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
[ I sent this earlier, but I'm guessing I used the wrong address since
it didn't show up, apologies if it's a dup ]

Since you are talking about the TEC integration, there should be a *.cds
file for the SNMP style adapter.  In this adapter, you can have it do a
DNS (or possibly it does a gethostbyaddr) lookup for you:

CLASS YourClassName
  SELECT
    1: ATTR(=,$ENTERPRISE), VALUE(PREFIX, "1.3.6.1.4.1.12345");
    2: $SPECIFIC = 123;
  FETCH
    1: IPNAME($AGENT_ADDR);
  MAP
    hostname = $F1;
END

The fetch section here is the important part.

HTH,
Brandon

On Thu, 2004-04-22 at 16:12, Jane Curry wrote:
> Thanks James - $AGENT_ADDR does indeed get the IP address of the agent 
> with problems.  We get the same value mapped to the TEC origin field (by 
> default, it appears).  This is useful info but I'd still like a real 
> hostname, resolved the way NetView resolves everything else.  Otherwise 
> I can't look for duplicates in TEC if some events are for a hostname of 
> poppet.skills-1st.co.uk and some have a hostname of 10.0.0.100!
> Cheers,
> Jane
> 
> James Shanks wrote:
> 
> >
> > Jane -
> >
> > I took a quick look in the code and I think the man page left out the 
> > option you are looking for.
> > Try $AGENT_ADDR in your slot map in trapd.conf and see whether that 
> > gives you what you want.  I can see where we pull it, but I cannot 
> > tell whether it gets resolved or not later on.
> >
> > James Shanks
> > Level 3 Support  for Tivoli NetView for UNIX and Windows
> > Tivoli Software / IBM Software Group
> >
> >
> > *Jane Curry <jane.curry@skills-1st.co.uk>*
> > Sent by: owner-nv-l@lists.us.ibm.com
> >
> > 04/21/2004 05:07 PM
> > Please respond to
> > nv-l
> >
> >
> >     
> > To
> >     nv-l@lists.us.ibm.com
> > cc
> >     
> > Subject
> >     Re: [nv-l] How to populate hostname in TEC slot mapping
> >
> >
> >
> >     
> >
> >
> >
> >
> >
> > I am using the xnmtrap GUI where everything gets configured.  The middle
> > boxes specify the TEC class to map a TRAP to and the TEC slot mapping.  
> > It is the TEC slot mapping where I want access to a hostname variable.  
> > I know I can use $COMMUNITY, $ENTERPRISE, $SOURCE_TIME, $TYPE, $SPECIFIC
> > and $V1 - 15 .  NetView enterprise TRAPs generally have the second TRAP
> > varbind as the hostname so for that I could use $V2 but many TRAPs don't
> > include the "host with the problem" as a TRAP varbind - it's part of the
> > SNMP/UDP/IP header after all and NetView obviously knows where it came
> > from because he always displays it in the event workspace and make it
> > available as the $A variable if you want to configure an action in the
> > bottom box of the xnmptrap application.
> >
> > Does that make sense?
> >
> > Cheers,
> > Jane
> >
> > James Shanks wrote:
> >
> > >
> > > I'm confused Jane.
> > > Where are you trying to specify the variable?  In trapd.conf?  In the
> > > ruleset itself?  
> > >
> > > James Shanks
> > > Level 3 Support  for Tivoli NetView for UNIX and Windows
> > > Tivoli Software / IBM Software Group
> > >
> > >
> > > *Jane Curry <jane.curry@skills-1st.co.uk>*
> > > Sent by: owner-nv-l@lists.us.ibm.com
> > >
> > > 04/21/2004 03:33 PM
> > > Please respond to
> > > nv-l
> > >
> > >
> > >                  
> > > To
> > >                  NetView mailing list <nv-l@lists.us.ibm.com>
> > > cc
> > >                  
> > > Subject
> > >                  [nv-l] How to populate hostname in TEC slot mapping
> > >
> > >
> > >
> > >                  
> > >
> > >
> > >
> > >
> > >
> > > NetView 7.1.4 for Unix.
> > > I want  be able to populate the hostname TEC slot for any generic TRAP
> > > that NetView is configured to forward to TEC.    Default events in
> > > TEC_ITS.rs seem to get hostname populated automatically.  If I wsa
> > > configuring a NetView TRAP for automatic action, I'd use $A for the
> > > machine that sent the TRAP.  Is there an equivalent environment variable
> > > to use for slot mapping.  I've tried $HOSTNAME and $A to no avail.
> > >
> > > Cheers,
> > > Jane
> > >
> > > --
> > > Tivoli Certified Consultant & Instructor
> > > Skills 1st Limited, 2 Cedar Chase, Taplow, Bucks, SL6 0EU, UK
> > > Tel: +44 (0)1628 782565
> > > Copyright (c) 2004 Jane Curry <jane.curry@skills-1st.co.uk>.  All
> > > rights reserved.
> > >
> > >
> > >
> >
> > -- 
> > Tivoli Certified Consultant & Instructor
> > Skills 1st Limited, 2 Cedar Chase, Taplow, Bucks, SL6 0EU, UK
> > Tel: +44 (0)1628 782565
> > Copyright (c) 2004 Jane Curry <jane.curry@skills-1st.co.uk>.  All 
> > rights reserved.
> >
> >
> >
-- 
Brandon Mitchell <bmitch3020@cox.net>
http://members.cox.net/bmitch3020/


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

Archive operated by Skills 1st Ltd

See also: The NetView Web