I was wondering if there is a way to simplify the following tests
I have 3 tests that I need to do on several different Citrix servers.
I need to test for 3 services running and have created them individually. Each test has a master test to ping that particular server and make sure its alivie before testing each service. I created an action profile that uses the variables
%ServiceComp% and %ServiceName% that will start the service being checked and send an e-mail. What I am not sure if I can do is to use a variable in the Service test that will look at the master tests and pull a variable for the hosts that i am pinging and then use the variable of the hosts in the "check service on field"
Example: ping servers A B and C Set them as master tests for Checking Services 1 2 and 3 on Server A then Server B and Then Server C. The Service check would sequentially look at each master test, use that server variable name and check the service on each master test server.
I hope I explained this well.
Thanks
Don
sub tests using a variable?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
You may try to setup test items using the folowing scheme:
1. Create 3 Ping test items (e.g. PingA, PingB, PingC)
2. Create HMS script with the following content:
SetCurrentFolder %FullPath%
SetFolderVariable fvar_ServiceHost %HostAddr%
RefreshTest ServiceD
RefreshTest ServiceE
RefreshTest ServiceF
3. Assign one "Run HMS script" action with this script to three Ping test items.
4. Place 3 Service test items (e.g. ServiceD, ServiceE, ServiceF) into the same folder.
5. Specify \\%fvar_ServiceHost% as "Check service on" parameter of each Service test.
This is basic idea. You may use HMS script to enable/disable test items to create some sequence, refresh Service test items etc.
1. Create 3 Ping test items (e.g. PingA, PingB, PingC)
2. Create HMS script with the following content:
SetCurrentFolder %FullPath%
SetFolderVariable fvar_ServiceHost %HostAddr%
RefreshTest ServiceD
RefreshTest ServiceE
RefreshTest ServiceF
3. Assign one "Run HMS script" action with this script to three Ping test items.
4. Place 3 Service test items (e.g. ServiceD, ServiceE, ServiceF) into the same folder.
5. Specify \\%fvar_ServiceHost% as "Check service on" parameter of each Service test.
This is basic idea. You may use HMS script to enable/disable test items to create some sequence, refresh Service test items etc.
It does not make any sense.
1) If Test-Service1 checks service on server1, it should depend on Ping-Server1 only. It should not depend on Ping-Server2 or Ping-Server3 (unless I do not understand something and these hosts/services connected in some way).
2) If you set Test-Service1 as dependant item on Ping-Server1, Ping-Server2 and Ping-Server3, this means test should not be performed if any of these servers does not respond? Are you sure you need this?
3) If you set Test-Service1 as dependant item on Ping-Server1, Ping-Server2 and Ping-Server3, HostMonitor will ping all 3 hosts before starting Test-Service1 test. And this test will be performed just once for 1 host.
4) One item that may check various hosts will make mess in logs, mess in statistics data.
and so on..
I can find more reasons to tell why you should setup 3 test items if you want to check 3 hosts.
What is the reason to use 1 test to check services on several different hosts (unless this is cluster)?
Regards
Alex
1) If Test-Service1 checks service on server1, it should depend on Ping-Server1 only. It should not depend on Ping-Server2 or Ping-Server3 (unless I do not understand something and these hosts/services connected in some way).
2) If you set Test-Service1 as dependant item on Ping-Server1, Ping-Server2 and Ping-Server3, this means test should not be performed if any of these servers does not respond? Are you sure you need this?
3) If you set Test-Service1 as dependant item on Ping-Server1, Ping-Server2 and Ping-Server3, HostMonitor will ping all 3 hosts before starting Test-Service1 test. And this test will be performed just once for 1 host.
4) One item that may check various hosts will make mess in logs, mess in statistics data.
and so on..
I can find more reasons to tell why you should setup 3 test items if you want to check 3 hosts.
What is the reason to use 1 test to check services on several different hosts (unless this is cluster)?
Regards
Alex