nv-l
[Top] [All Lists]

Re: [nv-l] EventForwarding to TEC - cut Domain from Hostname

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] EventForwarding to TEC - cut Domain from Hostname
From: Larry Fagan <larrytechie@yahoo.com>
Date: Wed, 1 Jun 2005 06:13:48 -0700 (PDT)
Delivery-date: Wed, 01 Jun 2005 14:14:24 +0100
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fiQWh+3jvtwB4W4vncduAdVeFx7CuXN+Q7Izv5YQ2zCLON91Dy0kMnO6l1LHPJMjpphxdxSleWkrAqR6FJ9Wh5Xl2UWN9I2ppXSH2Bn2IchJymin4oDFiBrlw0WNCN3gKApx8+HQzo2ajj3ZyeHAjg7WsudoDppaKhT+Qq1VskA= ;
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: 6667
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
Martina,
In this case then the best bet is to dump the hostname
into a knowledge base and check if the value is a
integer or string and then process the rest in the
rule. This might need some simple shell scripting as
well. I also know there is TEC predicate which does
this but i'm not very sure which one...
Good luck
Larry

--- Martina Haseneder <martina.haseneder@datev.de>
wrote:
> Hi Larry,
> 
> thanks for reply.
> 
> Our TEC-Administrator has a rule like:
> 
> (
>                 /* find the first '.' in the
> hostname */
>                 atompart(_hostname,'.',_pos,_),
>                 /* we want all up to the dot, but
> not the dot itself */
>                 _cut is _pos - 1,
>                 /*  get the prefix */
>                
> atompart(_hostname,_new_hostname,1,_cut),
>                 /*  set the slot hostname */
>                
> bo_set_slotval(_event,'hostname',_new_hostname)
>                 /*  re_mark_as_modified is not
> needed in reception actions
> */
>         )
> 
> 
> But unfortunately this is not useful if the hostname
> is a IP-Adress.
> Maybe you know how to complete the rule?
> 
> 
> 
> ----- Original Message ----- 
> From: "Larry Fagan" <larrytechie@yahoo.com>
> To: <nv-l@lists.us.ibm.com>
> Sent: Tuesday, May 31, 2005 7:01 PM
> Subject: Re: [nv-l] EventForwarding to TEC - cut
> Domain from Hostname
> 
> 
> > Martina,
> > This is very simple in TEC rules.. use atompart
> > predicate in rules to get the hostname only. You
> need
> > to use atompart for three times in rule since
> there
> > are three dots in a FQDN.
> > Regards,
> > Larry
> >
> > --- Martina Haseneder <martina.haseneder@datev.de>
> > wrote:
> > > Hi folks,
> > >
> > > I have a  very special problem, i guess.
> > >
> > > Most administrators of servers send a
> "Maintenance
> > > Mode" to the TEC for the reason, that all Events
> for
> > > this Node get ignored for a while.
> > > They send a wpostemsg with the simple Hostname
> like
> > > "un031e00".
> > >
> > > The NetView-Server sends a "Node Down" Event
> with a
> > > full qualified Name like
> > > "un031e00.service.domain.de"
> > > Now the "two Names" are not identic so the
> > > Maintenance Mode is not able to operate and we
> get
> > > undesired alarms.
> > >
> > >
> > > The domains are not really important for us
> because
> > > allready the "Simple Hostname" is unique.
> > > Finally we thought about cutting off the domain.
> > >
> > >
> > > What is better:
> > >     strip the Hostname in a Ruleset
> > >     (how could I influence the slot "hostname")
> > > or
> > >     strip the Hostname at the TEC
> > >     (has anybody knowhow of "prolog")
> > >     (I would need a rule which
> > >         cuts nothing if the the string is
> numeric
> > > (IP-Adress) and
> > >         cuts after the first "." (Hostname +
> > > Domain))
> > >
> > > All ideas make me happy
> > >
> > > Bye
> > > Martina
> > >
> > > NV for UNIX 7.1.4 on AIX 5.2
> > > Tivoli Enterprise Console 3.8
> > >
> > >
> > >
> > >
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> 
> 


                
__________________________________ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

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

Archive operated by Skills 1st Ltd

See also: The NetView Web