nv-l
[Top] [All Lists]

RE: [nv-l] nvmail

To: nv-l@lists.tivoli.com
Subject: RE: [nv-l] nvmail
From: "James Shanks" <jshanks@us.ibm.com>
Date: Wed, 22 May 2002 10:00:37 -0400
Vikas -

Please do not send me personal mail.  I cannot accpet user questions nor 
problems off the list, nor directly.
In the future please post all questions to the list. Do not send them to 
me directly, please.

What you are asking me is an NT question -- how do I pass parameters to a 
batch (bat) file? 
There are many users who an help you do this.   But you might be happier 
using
a real scripting language such as TCL or PERL.
In your bat file you must reference the passed parameters with a
percent sign, % , and remember that they are positional.
The first passed parameter is %1, the second %2, and so on.
So your  bat file, let's call it "mynvmail.bat" would have to look 
something like this:
     -------START SCRIPT-------
     C:\usr\ov\bin\nvmail -server ferrari.raleigh.tivoli.com -recipient  ^
jshanks@us.ibm.com -subject "test node warning" -message " Warning !  Node 
%2  is %3"
     -------END OF SCRIPT-------
and you would have something like this in the box labeled "Run this command
..."
     C:/mynvmail  $2 "$3"
The quotes around the $3 are necessary because it resolves to a string
containing blanks and the netsend is blank delimited.

Hope this helps. 

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





Vikas Kumar Gupta <VGupta@bangalorelabs.com>
05/22/2002 01:47 AM

 
        To:     James Shanks/Raleigh/IBM@IBMUS
        cc: 
        Subject:        RE: [nv-l] nvmail

 

Hi James, 
Sorry It does work if I give the entire thing in the action field in the 
trap settings box.But I was trying to run it as a batch file by writing 
this entire thing in a batch file and giving the batch file name in the 
trap settings field along with the paramters.Is it possible to send mail 
to multiple recepient using this? or is there any other way to do so.
regards 
Vikas 
-----Original Message----- 
From: James Shanks [mailto:jshanks@us.ibm.com] 
Sent: Tuesday, May 21, 2002 2:00 PM 
To: nv-l@lists.tivoli.com 
Subject: Re: [nv-l] nvmail 

It would help if you would include the platform you are using.   UNIX? NT? 
Basically you pass parameters to nvmail from trapd using the "$n" syntax, 
the same way you do for any command for the platform you are on.  The 
on-line help in "Trap Settings" (NT) and in "xnmtrap" (UNIX) explains this 

kind of thing in some detail if  you will take the time to read it. 
On NT you will want to run the command as a "Hidden Command" and use a 
syntax like this ( I had this attached to "Node Up"): 
C:\usr\ov\bin\nvmail -server ferrari.raleigh.tivoli.com -recipient 
jshanks@us.ibm.com -subject "test node up" -message " $1 $2 $3 $4 $5" 
On UNIX  it would be very similar: 
/usr/OV/bin/nvmail -server ferrari.raleigh.tivoli.com -recipient 
jshanks@us.ibm.com -subject "test node up" -message " $1 $2 $3 $4 $5" 

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




Vikas Kumar Gupta <VGupta@bangalorelabs.com> 
05/21/2002 05:28 AM 
  
        To:     "'nv-l@lists.tivoli.com'" <nv-l@lists.tivoli.com> 
        cc: 
        Subject:        [nv-l] nvmail 
  
Hi All, 
Has anyone used the nvmail to send mail when an event occurs.This command 
works fine but then can anyone tell me how do I pass relevant parameters 
for the event so that the mail message makes sense and helps identify the 
node/event from where the event is generated. 
An urgent help is needed. 
Regards 
Vikas Gupta 


--------------------------------------------------------------------- 
To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com 
For additional commands, e-mail: nv-l-help@lists.tivoli.com 
*NOTE* 
This is not an Offical Tivoli Support forum. If you need immediate 
assistance from Tivoli please call the IBM Tivoli Software Group 
help line at 1-800-TIVOLI8(848-6548) 



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

Archive operated by Skills 1st Ltd

See also: The NetView Web