ShellScript Params as Macro Variable

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

ShellScript Params as Macro Variable

Post by oryagel »

Hi,

I have a shell script test.
I want to have the Params field in the Comment field.
I can use

Code: Select all

%object% %object2%
but that only gives the first two params.

Is there a a way to get all params?

Thanks
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

There is no another variable but I am not sure why do you need it. You may copy parameters into comment.
Are you changing test parameters on regular basis?

Regards
Alex
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

Yes. We use parameters for thresholds values.
In addition, we duplicate tests and edit them instead of creating them from an empty template.
Copying the parameters to the comment will make us to remember to edit both fields.

Thanks
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

So there is no way to get the parameters and use it in the comment?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

No.
May be we can implement some option but right now we are busy with version 10.00. This task will not be implemented before version 10.00 release

Regards
Alex
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

Bumping up this thread..

We need the ability to use the Params of a Shell Script test in an action of type "Execute external program".

For example, the Params contains a lower threshold, upper threshold and time frame in minutes. We want the action to be able to use these values.

Thanks
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You may try using %TestedObjectInfo% variable.
It has value like the following:
Shell script "ScriptName" [ScriptParam1 ScriptParam2 ScriptParam3]

Another way is to use %Object% and %Object2% variables in Comment Line N, then use %CommentLineX% variable as parameter for action.
E.g.:
Specify Comment Line 5 as: %Object% %Object2%
Use %CommentLine5% variable as parameter of the action.
Only first 2 parameters can be retrieved using this method.

Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... #currmacro
http://www.ks-soft.net/hostmon.eng/mfra ... pvariables
Post Reply