- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- I cant pass %devicename% as a parameter
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 04:02 AM
01-12-2006 04:02 AM
When I pass the parameters
"plain %noticeplaintext% name"
it works as expected.
However when I try and pass the parameters
"plain %noticeplaintext% name %devicename%"
I get the following error
"One of the tool's parameterized strings failed to expand. Invalid "% " token found in the parameterized string at column 22."
Does anyone have an example of passing serveral HP SIM parameters? Or can people spot an obvious syntax error I am making? I have tried other parameters and noticeplaintext is the only one that has not given me an error.
Any help would be appreciated!
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 06:06 AM
01-12-2006 06:06 AM
Re: I cant pass %devicename% as a parameter
Are you just picking up the parameters HPSIM passes by default?
I use perl, and to ensure the standard environment variables passed are picked up I use the "use env;" construct.
From there I can access any of the standard variables passed by HPSIM including DEVICENAME and others.
In perl they're just preceded by a "$" and by convention are capitalized.
Just to clarrify, I do not populate any environment variables in the Custom Command set up. I just use those passed by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 08:10 AM
01-12-2006 08:10 AM
Re: I cant pass %devicename% as a parameter
I am trying to pass the device name of the machine that caused an event to my script as a parameter. However when I write %devicename% in the parameters text box, the SIM console gives me the invalid token error I mentioned in my first post. From the HP SIM documentation I believe %devicename% is one of the parameters HP SIM can pass.
I don't utilise any environment variables in the Custom Command set up either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2006 09:43 PM
01-12-2006 09:43 PM
Re: I cant pass %devicename% as a parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2006 01:52 PM
01-15-2006 01:52 PM
Re: I cant pass %devicename% as a parameter
My Executable & Pathname would be to the perl executable, the parameter would be the name of the perl script.
Again I've not used vb scripts, but you may not need anything in the parameters field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2006 08:38 PM
01-15-2006 08:38 PM
Re: I cant pass %devicename% as a parameter
How do you pass event data to your scripts when writing in PERL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2006 06:32 AM
01-16-2006 06:32 AM
SolutionIn perl you use the "use env;" construct. After that I just need to use the $DEVICENAME in the script.
So a set up like the following:
The path to executable would be - c:\perl\bin\perl.exe
The parameter would be - d:\mydirectory\test001.pl
And test001.pl would be something like:
use Env;
$Outfile = $DEVICENAME."mailfile.tmp";
open MAILTMP, ">$Outfile";
# Format the Mail Message
print MAILTMP <
Impact_ref:5
Urgency_ref:5
Configitem:$DEVICENAME
Customer:phredde@myco.nz
Problemdesc:$NOTICEPLAINTEXT
System:insight_manager
MAILEND0
close MAILTMP;
In this case I pick up and use the two variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2006 09:29 PM
01-16-2006 09:29 PM
Re: I cant pass %devicename% as a parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2006 10:18 PM
01-16-2006 10:18 PM
Re: I cant pass %devicename% as a parameter
I've attached my simple VB script that reads all the Process environment variables and writes them out to a log file.