nv-l
[Top] [All Lists]

Re: [nv-l] RULESET ?

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] RULESET ?
From: Jeff Fitzwater <jfitz@princeton.edu>
Date: Fri, 03 Oct 2003 09:11:39 -0400
Delivery-date: Fri, 03 Oct 2003 14:16:38 +0100
Envelope-to: ajf@ourshack.com
Organization: OIT Systems & Networking
References: <OF7B7740B5.CAD39E29-ON86256DB3.00741A49-86256DB3.00763A51@us.ibm.com>
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l-digest@lists.us.ibm.com
Stephen Hochstetler wrote:

> Jeff,
>
> You only get the NVADD_EV trap for new devices coming into NetView...so you
> don't have to worry about them already have your IsOnBatt field or not.  So
> you build the smarset based on host name, then SmartSet membership is the
> only thing you have to check before taking your action block.
>
> Stephen Hochstetler              shochste@us.ibm.com
> International Technical Support Organization at IBM
> Office - 512-838-6198 (t/l 678)       FAX - 512-838-6931
> http://www.redbooks.ibm.com
>
>
>                       Jeff Fitzwater
>                       <jfitz@princeton.edu>          To:       
> nv-l@lists.us.ibm.com
>                       Sent by:                       cc:
>                       owner-nv-l-digest@lists        Subject:  Re: [nv-l] 
> RULESET ?
>                       .us.ibm.com
>
>
>                       10/02/2003 03:58 PM
>                       Please respond to nv-l
>
>
>
> "Barr, Scott" wrote:
>
> > I would suggest just setting up a smartset for the regular expression
> (hostname = "ups*") and then passing that to your action nodes if the node
> falls into the smartset. No need to query the database, smartset does that
> already for you.
> >
> > -----Original Message-----
> > From: owner-nv-l-digest@lists.us.ibm.com
> > [mailto:owner-nv-l-digest@lists.us.ibm.com]On Behalf Of Jeff Fitzwater
> > Sent: Thursday, October 02, 2003 2:25 PM
> > To: Netview
> > Subject: [nv-l] RULESET ?
> >
> > NV 7.1.3 on SOL 5.8
> >
> > In a RULESET using the QUERY DATABASE; Is there any way to use a REGEXP
> > in the LITERAL value to be compared?
> >
> > I am using the NVADD_EV event for new node added, to be processed
> > through a RULESET and then compare varbind 2, which carries the
> > hostname.
> > I then want to compare it to see if name starts with "ups-" and then
> > continue processing if TRUE.
> >
> > Jeff Fitzwater
> > OIT Systems & Networking
> > Princeton University
>
> Thanks for responding,
>
> It's a little more complicated than the question I asked.
> I already have my existing "ups" devices in a SMARTSET.  The problem is I
> have created a new FIELD called "isOnBatt" that accepts boolean value "YES"
> or "NO".
> As each new ups is added to database I wanted to set this field in each
> "ups" device, to "NO".    ( It gets set to YES if ups goes on battery and
> back to NO if it goes back to AC)
> I can do that with RULESET SET DATABASE FIELD but I must only set the new
> nodes that have name starting with "ups-".
> So I was trying to match first, with QUERY DATABASE FIELD hostname of att.
> #2, which is the only variable passed with NADD_EV event.
>
> I think that doing externally with script is only way.
>
> Thanks for any help.
>
> Jeff Fitzwater
> OIT Systems & Networking
> Princeton University

Stephen, thats exactly what I did and it works great.

EVENT STREAM
TRAP SETTING  =  NADD_EV
QUERY SMARTSET = ups
SET DATABASE FIELD =  isOnBatt

Non ups devices never get the field added.


Thanks for everyones help.

Mission complete.

Jeff Fitzwater
OIT Systems & Networking
Princeton University


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

Archive operated by Skills 1st Ltd

See also: The NetView Web