Not sure if that is what you want to do, but you can execute the perlscript 
directly and use all SANM variables as in the attached script.
It is not really a script, just the head of an old notifier script. The name of 
the script needs to be set in .alarmrc of course.

Note: Some variables are commented out, because I did not use them in this 
script.

Mit freundlichen Gruessen - Best regards

Joern Henrichs
Senior System Engineer
Datacenter
Global Infrastructure Operations

Computacenter AG & Co oHG
Enabling Users

Mariendorfer Damm 1-3, 12099 Berlin, Germany
Tel.:           +49 69 97779 342
Short-Dial:     522342
E-Mail: [email protected]
WWW: www.computacenter.de


-----Ursprüngliche Nachricht-----
Von: Porter, Craig [mailto:[email protected]] 
Gesendet: Donnerstag, 22. Januar 2015 14:48
An: spectrum
Betreff: RE: [spectrum] Run perl script from setscript

You might need to provide the path to perl.exe like this:

/usr/bin/perl /<path>/script.pl <args>

To find the path to perl, open a bash shell and run:

which perl

There are other ways to do it but one way is add something like this to the end 
of your SetScript and pass the arguments to your script as a delimited list 
like this (using pipe-delimiters here):

/usr/bin/perl /<path>/script.pl "${CAUSE}|${MHANDLE}|${MNAME}"

Then in your Perl script get the arguments like this:

my @args = split(/\|/, @ARGV[0]);
my $pCause = $args[0];
my $modelHandle = $args[1];
my $modelName = $args[2];


Craig Porter, Enterprise Systems Management - Availability & Performance 
Monitoring Marsh & McLennan Companies Global Technology Infrastructure (MGTI) | 
Centralized Operations Sackville House 1.6, 143-149 Fenchurch Street, London 
EC3M 6BN, Great Britain
+44 (0)20 7178 4827 | Mobile +44 (0)7585 803 093 | [email protected]
www.mmc.com


-----Original Message-----
From: kavi arasu [mailto:[email protected]]
Sent: 22 January 2015 13:12
To: spectrum
Subject: [spectrum] Run perl script from setscript

Hi All,

I need to run the perl script via setscript. Normally i used to run the perl as 
"perl [path]script.pl modelname" where modelname is the input of the perl.

This modelname input is retreived under "$MNAME" variable in setscript.

So, i need to run the command like "perl [path]script.pl $MNAME" Please let me 
know how to invoke this under setscript.

Thanks,
Kavi
---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]


Marsh Ltd. Registered in England and Wales Number: 1507274 Registered office 1 
Tower Place West, Tower Place, London, EC3R 5BU.

Marsh Ltd is authorised and regulated by the Financial Conduct Authority.

This message and any attachments are confidential.
If you have received this message in error please delete it from your system.
If you require any assistance please notify the sender. Thank you.

---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]

---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]

Attachment: setscript.pl
Description: setscript.pl

Reply via email to