nv-l
[Top] [All Lists]

Re: [nv-l] Rulesets - help needed

To: nv-l@lists.us.ibm.com
Subject: Re: [nv-l] Rulesets - help needed
From: James Shanks <jshanks@us.ibm.com>
Date: Mon, 7 Jun 2004 09:36:48 -0400
Delivery-date: Mon, 07 Jun 2004 14:55:50 +0100
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
In-reply-to: <OF20C8E814.D4390036-ON65256EA6.0067F7AD@dcmds.co.in>
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com
Sensitivity:

Expanding your ruleset in the way you suggest is not a trivial matter.  

Remember that rulesets are just a way to combine user programming with the event flow, a way to get  commands or scripts you write triggered by events.  Some of the script elements have been written for you in the form of the twenty or so ruleset nodes already provided.  But where there is no obvious ruleset  element, or node, which conveniently does the function you want, you have to be creative and architect something yourself, using what's available.  This is a programming exercise and requires analysis before you write the code.

So let's take a step back and think about what you have so far.  You have a Node Down event or Router Down event which triggers an e-mail.  Now you want to trigger another e-mail on receipt of what?  Node Up or Router Up?  OK, but which Node Up or Router Up?  Not all of them, but only those whose hostnames are ones for which you sent a previous e-mail.  How will you determine that?  Well, I think that depends on how long an interval you are willing to consider between the "down" e-mail and  "up again" e-mail?  An hour?  A day? A week?  Longer than a week?    

Let's look at the shorter cases first, say up to day between the Down and Up events because that is simpler.  In the case of a short interval, you could use Pass-On-Match to perform the logic you want.   From out of the Reset-On-Match you already have you would connect to a Pass-On-Match as Input 1.  And  for Input 2 you would have the  Node Up or Router Up that you used in the earlier Reset as well.  Once again you are matching on Attribute 2, the hostname.  The question is for how long?  You would code that value in the Pass-On-Match just as you did for the Reset-On-Match.  How long can you have?  Well, the editor will allow you to code up to 999 hours, 999 minute, 999 second, or about   42  days.    But is that a reasonable value?  

That depends upon how likely it is that you might have to re-cycle the NetView daemons during that time, or even just stop nvcorrd or trapd.  Remember this rulesets stuff is all done in memory, so if nvcorrd goes down while you are waiting for a matching event to come in, held event is lost.  It's not kept anywhere and reloaded when nvcorrd comes back up.   That's why using the simple Pass-On-Match might be a good idea for a short interval, hours or a day or two, but not for longer perhaps.  And remember, there is always the possibility that some Up e-mails might not be generated because of this.  So either your users have to expect that and not be too bothered by it, or you need another solution.

What else might you do?  You could use  Set and Query DataBaseField nodes to write a record that you had sent the Down e-mail, and then query that before you send the Up one, and remove the value again.  Or since you are doing this in an Action block anyway, you could modify your action script to do the same thing with a file of you own, say in /usr/OV/log, so you could easily see what devices were awaiting Up messages.  

In short, this is a programming exercise, and like any such exercise, it is up to you to be creative.


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



john@cosmos.dcmds.co.in
Sent by: owner-nv-l@lists.us.ibm.com

06/01/2004 02:59 PM
Please respond to
nv-l

To
nv-l@lists.us.ibm.com
cc
Subject
[nv-l] Rulesets - help needed





Hi James,

Thanks.  This procedure worked and I was able to get mail whenever the node
remains down for a specified time.
However the client also wants a "node up" mail whenever the node comes up
after the above "node down" mail.
Could you please help?
We are working with netview 7.1.3 on AIX 5L.

Thanks,

V.K.Bhatia


                                                                                                                     
                   James Shanks                                                                                      
                   <jshanks@us.ibm.c        To:     nv-l@lists.us.ibm.com                                            
                   om>                      cc:                                                                      
                   Sent by:                 Subject:     Re: [nv-l] ruleset in Unix                                  
                   owner-nv-l@lists.                                                                                  
                   us.ibm.com                                                                                        
                                                                                                                     
                                                                                                                     
                   04/15/2004 07:41                                                                                  
                   PM                                                                                                
                   Please respond to                                                                                  
                   nv-l                                                                                              
                                                                                                                     
                                                                                                                     




The use of the various ruleset constructs, or nodes, as they are called,
are explained in the NetView Admin Guide.  I'd start by reviewing that
material.
You are going to use the graphical ruleset editor, nvrsEdit, to construct
your ruleset.  You might want to look at the samples and play with them in
the editor to get a feel of it.

Basically you are writing two rulesets (which could be later combined into
one) that are both very similar.  The major construct in each is
Reset-On-Match.  It does just what you describe.  It holds an event for a
specified time period and if the designated match occurs, the event is
dropped; otherwise it is passed on.

For your Node down case
So you start with the Event Stream node, the thing that looks like a purple
pizza, set to Block events (so you can control when they are displayed) and
from that you have two Trap Settings, one for Node Down and one for Node
Up.   The two Trap Settings are connected to the event stream but not to
each other as they represent parallel paths.  The Node down connects then
to the Reset-On-Match in the Input 1 slot.  The Node Up to the Input 2
slot.  In the Reset, your matching attribute will the be hostname of the
incoming event, which for NetView is always Attribute 2 of the event. and
the time will be 5 minutes.  On the output side of the Reset-On-Match you
will have an Action node.  In it you will put the full path to a script you
will write to send the event text you want in e-mail.  You would use the
UNIX sendmail command for that.

For your Router Marginal case, you have the same structure except that the
two TrapSettings are for Router Marginal, rather than Node Down, and Router
Up rather than Node Up

To activate your ruleset(s) you would put the name of them in
/usr/OV/conf/ESE.automation and restart actionsvr who will run them.  You
can see the commands being logged in his logs, nvaction.alog and blog.  You
can trace the action of the ruleset in the nvcorrd log, if you first issue
the command "nvcdebug -d all" to cause the trace to activate.

Hope this helps

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

                                                                         
john@cosmos.dcmds.co.in                                                  
Sent by: owner-nv-l@lists.us.ibm.com                                      
                                                                       To
                                                     nv-l@lists.us.ibm.co
04/15/2004 12:04 AM                                  m                    
                                                                       cc
                                                                         
            Please respond to                                     Subject
                  nv-l                               [nv-l] ruleset in    
                                                     Unix                
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         
                                                                         





Hi,

I want to write a ruleset to take action whenever the down event recived it
should hold for 5 minutes,If Upevent is recived within 5 mins then both
events will dropped. If UP event is not recived,within the allowed time
then down event will trigger and mail is to be send.Also in the case of
router if ruter marginal event recieved it should block router down event
also for 5 minutes,if up event recieved within 5 min then both the event
should dropped,otherwise mail is to be generated

If any body has the idea then please help, I am a new user of Netview

with Regards

John

---------------------------------------------------------------------------
The information in this e-mail is the property of DCM DataSystems and may
be confidential and privileged. It is intended solely for the addressee and
access of this email by anyone else is unauthorised. If you are not the
intended receipient, any disclosure, copying, distribution or any action
taken in reliance of this message is prohibited and may be unlawful. If you
receive this message by error, please notify the sender immediately and
delete all copies of this message.
---------------------------------------------------------------------------







---------------------------------------------------------------------------
The information in this e-mail is the property of DCM DataSystems and may
be confidential and privileged. It is intended solely for the addressee and
access of this email by anyone else is unauthorised. If you are not the
intended receipient, any disclosure, copying, distribution or any action
taken in reliance of this message is prohibited and may be unlawful. If you
receive this message by error, please notify the sender immediately and
delete all copies of this message.
---------------------------------------------------------------------------




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

Archive operated by Skills 1st Ltd

See also: The NetView Web