nv-l

Re: [nv-l] Automatic actions - how to reference the source address / hostname

2005-05-09 13:40:23
Subject: Re: [nv-l] Automatic actions - how to reference the source address / hostname
From: James Shanks <jshanks AT us.ibm DOT com>
To: nv-l AT lists.us.ibm DOT com
Date: Mon, 9 May 2005 13:39:38 -0400


We are talking about passed parameters here, and it is difficult to answer
a question like this without a specific example.
But for example, if you had a script called "mytest" and you wanted to pass
it  varbind 1, varbind 2, the enterprise oid, and the agent address, in
that order, you would do so like this:
     <full_path>mytest  $1 $2 $e $A
but inside your script these parameters would be referenced in order as
$1, $2, $3, and $4.  They are not exported as ruleset variables are.


Whether you use the agent address ($A) or the NetView attribute $2, which
always contains the hostname, depends upon whether you are dealing with a
NetView trapd on a non-NetView trap.  Only NetView traps have the hostname
in the second varbind.

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


                                                                           
             "Pretorius,                                                   
             Vynita"                                                       
             <[email protected]                                          To 
             o.za>                     <nv-l AT lists.us.ibm DOT com>           
  
             Sent by:                                                   cc 
             [email protected]                                             
             us.ibm.com                                            Subject 
                                       [nv-l] Automatic actions - how to   
                                       reference  the source address /     
             05/09/2005 11:32          hostname                            
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
                   nv-l                                                    
                                                                           
                                                                           




Hi all

Running 7.1.4 fp3 on solaris 2.8

I can only get Automatic actions to pass me what is in the string via $1 $2
$3, if I reference $e I get nothing?
I need the ip address or hostname of the source of the event how do I
reference it?

Any ideas

Thanks
Vynita Pretorius
+27 82 856 0321



                ___________________________________________


The views expressed in this email are, unless otherwise stated, those of
the author and not those
of the FirstRand Banking Group an Authorised Financial Service Provider or
its management.
The information in this e-mail is confidential and is intended solely for
the addressee.
Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or
omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity
of information and data
transmitted electronically and to preserve the confidentiality thereof, no
liability or
responsibility whatsoever is accepted if information or data is, for
whatever reason, corrupted
or does not reach its intended destination.


                    __________________________________







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