nv-l
[Top] [All Lists]

Re: Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names

To: nv-l@lists.tivoli.com
Subject: Re: Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names
From: James_Shanks@tivoli.com
Date: Wed, 9 Aug 2000 09:29:39 -0400

Gavin -

You are correct.  The ruleset editor is designed for non-programmers.  If you
want to program we have the In-line action and the action node.   Heck, you
could just write your own trap reception daemon which connects to trapd (we have
an example in /usr/OV/prg_samples) and do what you like after that, bypassing
nvcorrd and rulesets all together.   That is your ultimate solution.

Life would not be simpler if the editor allowed C-programming -- that would mean
that things would be too complicated for the average user.   If your rule is so
complex that you cannot visualize it on the screen, then you shouldn't be using
a rule.  That way leads to performance problems.  Also, we have talked about
your connection to the server -- it sounds way too slow for you to be trying to
do complicated X-windows operations.

James Shanks
Team Leader, Level 3 Support
 Tivoli NetView for UNIX and NT



"Gavin Newman" <NEWMANGJ@banksa.com.au> on 08/08/2000 07:20:19 PM

Please respond to IBM NetView Discussion <nv-l@tkg.com>

To:   nv-l@tkg.com
cc:    (bcc: James Shanks/Tivoli Systems)
Subject:  [NV-L] R
éf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable
      Names



Alexis

Thanks for your perserverence with this and your assistance. I ended up writing
a daemon process which manages an in-memory store for device status and call
that from an in-line action. This has the required result and was much more fun
to write.

Life would be a lot easier if Netview allowed a C-like text based programming
language for the rules editor instead of the GUI. The GUI seems to be aimed at
small non-complex rules, when writing large complex rules it seems that the GUI
gets in the way especially when the rule covers more real estate than the screen
can display and also when the GUI reorganises the layout of nodes every time a
new node is added. Just as you get a mental picture of the entire rule the GUI
seems to shift the nodes around - tres confusing non! (Excuse my attempt at
schoolboy French but I last touched that language in 1965!)

Regards - Gavin

>>> <alexis.henry@bnpparibas.com> 08/08/2000 17:42:18 >>>
I tried to do it exporting environment variable but i failed. I don't see how to
do it the way you want it.
So try to do it using shell script as i explain to you. I think that the better
way to do it is to put your data and their value in a file.
With grep and cut command you can do it easily.

Just my two cents.

Good luck.


Alexis Henry
Banque Nationale de Paris.





Internet

NEWMANGJ@banksa.com.au on 08/08/2000 01:39


Veuillez r
épondre à nv-l@tkg.com

Pour :    nv-l
cc :
ccc : Alexis Henry
Objet :   [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names



Alexis

Thanks again for your reply.

Yes, I want to create a global variable in the rules with the name of the
variable being the contents of $NVATTR_3 ie the name of the device that is down.
The reason for this is that I want to be able to keep a variable for each device
that is currently down.

Cheers - Gavin

>>> <alexis.henry@bnpparibas.com> 07/08/2000 17:03:55 >>>
Yes my trick is to be done in a shell script.
If i understand the matter i don't see how to do it otherwise.

Let me ask a question so i can be sure i understand you: do you want to set a
variable whose name is the value of $NVATTR_3 ? If so i don't see any other way
to do it. If you don't want to write a shell script you can do it on one line in
an action node an try to export this data. I don't know if that will work.

I will try to do it.

As soon as i am successful i will mail the way to do it to you.

Alexis




Internet

NEWMANGJ@banksa.com.au on 07/08/2000 01:51


Veuillez répondre à nv-l@tkg.com

Pour :    nv-l
cc :
ccc : Alexis Henry
Objet :   [NV-L] Re: Réf. : [NV-L] Global Variable Names



Alexis

Does your trick refer to doing it in a shell script?? What I want to do is
establish the variable in the actual rule - is in the Set Global Variable node I
want to create a variable that takes the name of the device that the event
refers to and then assign a value for it.

Cheers - Gavin

>>> <alexis.henry@bnpparibas.com> 04/08/2000 16:58:06 >>>

Hi Gavin !

There is a trick to do so but it is quite a strange way to do it.
If i understand well you should do it this way:

echo $var | read $(echo $NVATTR_3).
(let assume that "var" is the data you want to set in what you named $$NVATTR_
3)


I explain: "read" is an Aix command that set a data with a stream comming from
<STDIN> wich name is the first argument in the command line.
Here i do $(echo $NVATTR_3) so the shell return "fred" because $NVATTR_3 is
"fred"

So:    echo $var | read $(echo $NVATTR_3)   ==>  echo $var | read fred
Then if you run "echo $fred" you will see the value  in "var".
The $fred data now exists.

Alexis Henry
Banque Nationale de Paris.







NEWMANGJ@stgeorge.com.au on 04/08/2000 04:31:22

Veuillez répondre à nv-l@tkg.com

Pour :    nv-l@tkg.com
cc :   (ccc : Alexis Henry/DOSI/BNP)
Objet :   [NV-L] Global Variable Names



_____________________________________________________________________________________________________________________________________




Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans
l'hypothèse où il aurait été modifié.

----------------------------------------------------------------------------------



This message and any attachments (the "message") are intended solely for the
addressees and are confidential. If you receive this message in error, please
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and
its subsidiaries) shall (will) not therefore be liable for the message if
modified.
_____________________________________________________________________________________________________________________________________






**********************************************************************
   *****   IMPORTANT INFORMATION    *****
This document should be read only by those persons to whom
it is addressed and its content is not intended for use by
any other persons. If you have received this message in
error, please notify us immediately. Please also destroy and
delete the message from your computer. Any unauthorised form
of reproduction of this message is strictly prohibited.
Bank SA is not liable for the proper and complete transmission
of the information contained in this communication, nor for any
delay in its receipt.
**********************************************************************
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l






_____________________________________________________________________________________________________________________________________



Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans
l'hypothèse où il aurait été modifié.

----------------------------------------------------------------------------------


This message and any attachments (the "message") are intended solely for the
addressees and are confidential. If you receive this message in error, please
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and
its subsidiaries) shall (will) not therefore be liable for the message if
modified.
_____________________________________________________________________________________________________________________________________


_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l






_____________________________________________________________________________________________________________________________________


Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur.

Toute utilisation de ce message non conforme à sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.

L'internet ne permettant pas d'assurer l'intégrité de ce message, BNP PARIBAS
(et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans
l'hypothèse où il aurait été modifié.

----------------------------------------------------------------------------------

This message and any attachments (the "message") are intended solely for the
addressees and are confidential. If you receive this message in error, please
delete it and immediately notify the sender.

Any use not in accord with its purpose, any dissemination or disclosure, either
whole or partial, is prohibited except formal approval.

The internet can not guarantee the integrity of this message. BNP PARIBAS (and
its subsidiaries) shall (will) not therefore be liable for the message if
modified.
_____________________________________________________________________________________________________________________________________

_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l
_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l






<Prev in Thread] Current Thread [Next in Thread>
  • Re: Réf. : [NV-L] Réf. : [NV-L] Re: Réf. : [NV-L] Global Variable Names, James_Shanks <=

Archive operated by Skills 1st Ltd

See also: The NetView Web