I want to have a test that will show the uptime for my application on a monthly basis. I'm new, and I'm not sure how to do something like this. The application is web-based, and spans 6 servers with some load balancing so I need a test to perform the following criteria:
At least 2 out of the 3 webservers are alive using a ping test, and IIS is running. (They are load balanced)
At least 1 of the 2 database servers are alive and running the MSSQL service. (They are clustered).
The application server is alive and all 5 application services are running.
The loadbalancer is alive.
I want a test to check all of this, and if all the criteria is met it returns good, but if one criteria is not met it returns bad. How could I do this?
Application Uptime
You should setup test item for each service: 3 web tests, 2 database tests, 5 services and 1 loadbalancer = 11 test items.
For example you named test items as LoadBalancer, ServiceTest1..ServiceTest5, DataBase1, DataBase2, WebService1..WebService3
Then you should setup auxiliary test item (e.g. ping localhost) and use "This test depends on expression" option and expression like
(''%::LoadBalancer::SimpleStatus%'=='UP') and ('%::ServiceTest1::SimpleStatus%'=='UP') and ('%::ServiceTest2::SimpleStatus%'=='UP') and ('%::ServiceTest3::SimpleStatus%'=='UP') and ('%::ServiceTest4::SimpleStatus%'=='UP') and ('%::ServiceTest5::SimpleStatus%'=='UP') and (('%::DataBase1::SimpleStatus%'=='UP') or (('%::DataBase2::SimpleStatus%'=='UP')) and
( (('%::WebService1::SimpleStatus%'=='UP') and (('%::WebService2::SimpleStatus%'=='UP') or ('%::WebService3::SimpleStatus%'=='UP'))) or
(('%::WebService2::SimpleStatus%'=='UP') and (('%::WebService1::SimpleStatus%'=='UP') or ('%::WebService3::SimpleStatus%'=='UP'))) )
Use "Bad" as otherwisestatus parameter.
This way auxiliary test item will check conditions and return "Host is alive" or "Bad" status.
Regards
Alex
For example you named test items as LoadBalancer, ServiceTest1..ServiceTest5, DataBase1, DataBase2, WebService1..WebService3
Then you should setup auxiliary test item (e.g. ping localhost) and use "This test depends on expression" option and expression like
(''%::LoadBalancer::SimpleStatus%'=='UP') and ('%::ServiceTest1::SimpleStatus%'=='UP') and ('%::ServiceTest2::SimpleStatus%'=='UP') and ('%::ServiceTest3::SimpleStatus%'=='UP') and ('%::ServiceTest4::SimpleStatus%'=='UP') and ('%::ServiceTest5::SimpleStatus%'=='UP') and (('%::DataBase1::SimpleStatus%'=='UP') or (('%::DataBase2::SimpleStatus%'=='UP')) and
( (('%::WebService1::SimpleStatus%'=='UP') and (('%::WebService2::SimpleStatus%'=='UP') or ('%::WebService3::SimpleStatus%'=='UP'))) or
(('%::WebService2::SimpleStatus%'=='UP') and (('%::WebService1::SimpleStatus%'=='UP') or ('%::WebService3::SimpleStatus%'=='UP'))) )
Use "Bad" as otherwisestatus parameter.
This way auxiliary test item will check conditions and return "Host is alive" or "Bad" status.
Regards
Alex
Thanks for the help.
What is the syntax for the %::LoadBalancer::SimpleStatus% macros? I see how %SimpleStatus% works, but how is it prefixed? Is LoadBalancer the TestName? What happens when tests have the same name? Is it the TestID? Does it need to reside in the same folder? Sorry for the simple questions. I looked around the website, but didn't see much information about expressions.
What is the syntax for the %::LoadBalancer::SimpleStatus% macros? I see how %SimpleStatus% works, but how is it prefixed? Is LoadBalancer the TestName? What happens when tests have the same name? Is it the TestID? Does it need to reside in the same folder? Sorry for the simple questions. I looked around the website, but didn't see much information about expressions.
TestName. Test can be located in any folder. If you want to use such expressions, name should be unique
http://www.ks-soft.net/hostmon.eng/mfra ... #specmacro
Regards
Alex
http://www.ks-soft.net/hostmon.eng/mfra ... #specmacro
Regards
Alex