How to check OneClick Web Server status by using HTTP GET statement?

Document ID : KB000010270
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

If OneClick server is running in a stable state, on OneClick server there will be a stable.txt file automatically created under $SPECROOT\tomcat\webapps\spectrum directory. The content of this file is the followings:

This is an automatically generated file which indicates tomcat process is currently in stable state.  Should tomcat experience catastrophic error such as an out of memory error, the file will be automatically deleted. The file will be recreated upon tomcat restart.  Load balancer status checking which performs periodic checks on the health of a server shouldperform a GET on this stable file http://<host>:<port>/spectrum/stable. Failure to retrieve the file indicates either tomcat is not running or poor health of the tomcat process. 

If OneClick server is not running or poor health, this stable.txt file would not exist under $SPECROOT\tomcat\webapps\spectrum directory.

Environment:
Spectrum 9.4.x; Spectrum 10.x
Instructions:

To achieve load balancing, we can identically configure multiple OneClick web servers that are accessed through an external load balancing device.

We can configure our load balancer to check the status of each OneClick server by using the following HTTP GET statement during periodic server health checks:

http://<hostname>:<portnumber>/spectrum/stable

  • If OneClick Web Server is running stably, the result of this HTTP Get request is the content of the file which is:

This is an automatically generated file which indicates tomcat process is currently in stable state.  Should tomcat experience catastrophic error such as an out of memory error, the file will be automatically deleted. The file will be recreated upon tomcat restart.  Load balancer status checking which performs periodic checks on the health of a server shouldperform a GET on this stable file http://<host>:<port>/spectrum/stable. Failure to retrieve the file indicates either tomcat is not running or poor health of the tomcat process. 

  • If OneClick Web Server is not stable or running, the result of this HTTP Get request is:

Capture.JPG