Restaring a service after a Shell Script test

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
burnettt
Posts: 3
Joined: Tue Aug 08, 2006 9:27 am

Restaring a service after a Shell Script test

Post by burnettt »

I use a Shell Script test that tests a TFTP service by downloading a file. The server name is passed as a parameter using the "Params" field. This test runs on about 30 servers throughout the region. I want to add an action the restarts the service, but the "params" field in the test (where the server name is passed) does not seem to be available as a macro variable. Am I missing something?

As a work-around, we are also putting the server name in the "Related URL" field as well and setting the action to use this field, but this increases the chances of restarting the wrong service in the future.

Thanks.

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

Re: Restaring a service after a Shell Script test

Post by KS-Soft Europe »

burnettt wrote:I use a Shell Script test that tests a TFTP service by downloading a file. The server name is passed as a parameter using the "Params" field. This test runs on about 30 servers throughout the region. I want to add an action the restarts the service, but the "params" field in the test (where the server name is passed) does not seem to be available as a macro variable. Am I missing something?
You are right. There is no such a variable that represents the passed parameters.
burnettt wrote:As a work-around, we are also putting the server name in the "Related URL" field as well and setting the action to use this field, but this increases the chances of restarting the wrong service in the future.
The only solution I see is to use "Related URL" or "Comment" line to store the service name. Beside using the %RelatedURL% or %CommentLine1% variables in he action profile, you also may specify the same variable as a parameter for the "Shell script" test (e.g. Params: %CommentLine1%). In this case you should enable "Translate macros" option in "Test Properties" window for the "Shell script" tests.

If each test is located in a separate folder, you may use folder comment field and "%FCommentLine1%" variable in the same way.

Regards,
Max
burnettt
Posts: 3
Joined: Tue Aug 08, 2006 9:27 am

Thanks

Post by burnettt »

Thank you. I may use the folder trick for other tests as well.
Post Reply