nv-l
[Top] [All Lists]

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

To: nv-l@lists.tivoli.com
Subject: Re: Re: Réf. : [NV-L] Global Variable Names
From: James_Shanks@tivoli.com
Date: Mon, 7 Aug 2000 13:55:20 -0400

Well, what you want to do and what is possible may be two different things.  The
two Ruleset nodes, set and query global variables require that you hard code
into the ruleset at the time you write it what the variable name will be, and
how the value will be affected (set to some literal, set to some variable, or
incremented or decremented).    Since these are set at "createle time" (or
"compile time" if you will) and not at "run time", there may be no easy way to
do what you want without using your own script.

You could try making the variable name equal to $NVATTR_2 (the hostname) for
example and see if that works, but I don't guarantee it.   Most of the ruleset
mechanisms were designed to be very simple manipulations to you would not have
to write code, but if you want to do something they do not provide, you must
write your own scripts instead.

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



"Gavin Newman" <NEWMANGJ@banksa.com.au> on 08/06/2000 07:51:01 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] 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






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

Archive operated by Skills 1st Ltd

See also: The NetView Web