<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I cant pass %devicename% as a parameter in Server Management - Systems Insight Manager</title>
    <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707991#M17596</link>
    <description>I see there are no responses, so apologies in advance I've no vb experience.&lt;BR /&gt;&lt;BR /&gt;Are you just picking up the parameters HPSIM passes by default?&lt;BR /&gt;I use perl, and to ensure the standard environment variables passed are picked up I use the "use env;" construct.&lt;BR /&gt;&lt;BR /&gt;From there I can access any of the standard variables passed by HPSIM including DEVICENAME and others.&lt;BR /&gt;In perl they're just preceded by a "$" and by convention are capitalized.&lt;BR /&gt;&lt;BR /&gt;Just to clarrify, I do not populate any environment variables in the Custom Command set up. I just use those passed by default.</description>
    <pubDate>Thu, 12 Jan 2006 14:06:08 GMT</pubDate>
    <dc:creator>Rob Buxton</dc:creator>
    <dc:date>2006-01-12T14:06:08Z</dc:date>
    <item>
      <title>I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707990#M17595</link>
      <description>I'm using HP SIM 5. I'm trying to output all my events to text files. I have a vbscript which writes all the parameters passed to it to a text file.&lt;BR /&gt;&lt;BR /&gt;When I pass the parameters &lt;BR /&gt;"plain %noticeplaintext% name"&lt;BR /&gt;it works as expected.&lt;BR /&gt;&lt;BR /&gt;However when I try and pass the parameters &lt;BR /&gt;"plain %noticeplaintext% name %devicename%"&lt;BR /&gt;I get the following error&lt;BR /&gt;&lt;BR /&gt;"One of the tool's parameterized strings failed to expand. Invalid "% " token found in the parameterized string at column 22."&lt;BR /&gt;  &lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated!&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Thu, 12 Jan 2006 12:02:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707990#M17595</guid>
      <dc:creator>Sean Wheeler</dc:creator>
      <dc:date>2006-01-12T12:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707991#M17596</link>
      <description>I see there are no responses, so apologies in advance I've no vb experience.&lt;BR /&gt;&lt;BR /&gt;Are you just picking up the parameters HPSIM passes by default?&lt;BR /&gt;I use perl, and to ensure the standard environment variables passed are picked up I use the "use env;" construct.&lt;BR /&gt;&lt;BR /&gt;From there I can access any of the standard variables passed by HPSIM including DEVICENAME and others.&lt;BR /&gt;In perl they're just preceded by a "$" and by convention are capitalized.&lt;BR /&gt;&lt;BR /&gt;Just to clarrify, I do not populate any environment variables in the Custom Command set up. I just use those passed by default.</description>
      <pubDate>Thu, 12 Jan 2006 14:06:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707991#M17596</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2006-01-12T14:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707992#M17597</link>
      <description>I'm sorry I didnt explain my question very clearly. I have tested my VBscript and it works as I intended - I only mentioned it to help provide a background to my problem. &lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;I don't utilise any environment variables in the Custom Command set up either.</description>
      <pubDate>Thu, 12 Jan 2006 16:10:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707992#M17597</guid>
      <dc:creator>Sean Wheeler</dc:creator>
      <dc:date>2006-01-12T16:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707993#M17598</link>
      <description>I have enclosed a screen shot of the custom command I am writing, and the error I receive when I attempt to run the command. I hope this clarifys my situation.</description>
      <pubDate>Fri, 13 Jan 2006 05:43:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707993#M17598</guid>
      <dc:creator>Sean Wheeler</dc:creator>
      <dc:date>2006-01-13T05:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707994#M17599</link>
      <description>The Parameters Box is for when you use something like perl.&lt;BR /&gt;My Executable &amp;amp; Pathname would be to the perl executable, the parameter would be the name of the perl script.&lt;BR /&gt;&lt;BR /&gt;Again I've not used vb scripts, but you may not need anything in the parameters field.</description>
      <pubDate>Sun, 15 Jan 2006 21:52:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707994#M17599</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2006-01-15T21:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707995#M17600</link>
      <description>I can run my script without anything in the parameters field. However I want my script to record which device caused the error so I am trying to pass %devicename% as a parameter. This method works with the parameter %noticeplaintext%.&lt;BR /&gt;&lt;BR /&gt;How do you pass event data to your scripts when writing in PERL?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jan 2006 04:38:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707995#M17600</guid>
      <dc:creator>Sean Wheeler</dc:creator>
      <dc:date>2006-01-16T04:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707996#M17601</link>
      <description>The DEVICENAME and other parameters are passed by default by HPSIM, you just need to read them. I believe they're set as environment variables. &lt;BR /&gt;&lt;BR /&gt;In perl you use the "use env;" construct. After that I just need to use the $DEVICENAME in the script.&lt;BR /&gt;&lt;BR /&gt;So a set up like the following:&lt;BR /&gt;The path to executable would be - c:\perl\bin\perl.exe&lt;BR /&gt;The parameter would be - d:\mydirectory\test001.pl&lt;BR /&gt;&lt;BR /&gt;And test001.pl would be something like:&lt;BR /&gt;&lt;BR /&gt;use Env;&lt;BR /&gt;&lt;BR /&gt;$Outfile = $DEVICENAME."mailfile.tmp";&lt;BR /&gt;open MAILTMP, "&amp;gt;$Outfile";&lt;BR /&gt;&lt;BR /&gt;# Format the Mail Message&lt;BR /&gt;print MAILTMP &amp;lt;&lt;MAILEND0&gt;&lt;/MAILEND0&gt;Fwdgroup:Server Support&lt;BR /&gt;Impact_ref:5&lt;BR /&gt;Urgency_ref:5&lt;BR /&gt;Configitem:$DEVICENAME&lt;BR /&gt;Customer:phredde@myco.nz&lt;BR /&gt;Problemdesc:$NOTICEPLAINTEXT&lt;BR /&gt;System:insight_manager&lt;BR /&gt;&lt;BR /&gt;MAILEND0&lt;BR /&gt;close MAILTMP;&lt;BR /&gt;&lt;BR /&gt;In this case I pick up and use the two variables.</description>
      <pubDate>Mon, 16 Jan 2006 14:32:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707996#M17601</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2006-01-16T14:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707997#M17602</link>
      <description>Thanks for all your help Rob, I understand now :)</description>
      <pubDate>Tue, 17 Jan 2006 05:29:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707997#M17602</guid>
      <dc:creator>Sean Wheeler</dc:creator>
      <dc:date>2006-01-17T05:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: I cant pass %devicename% as a parameter</title>
      <link>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707998#M17603</link>
      <description>If anyone else is using VB script they may find this useful.&lt;BR /&gt;&lt;BR /&gt;I've attached my simple VB script that reads all the Process environment variables and writes them out to a log file.</description>
      <pubDate>Tue, 17 Jan 2006 06:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/i-cant-pass-devicename-as-a-parameter/m-p/3707998#M17603</guid>
      <dc:creator>Sean Wheeler</dc:creator>
      <dc:date>2006-01-17T06:18:42Z</dc:date>
    </item>
  </channel>
</rss>

