A servlet that runs on Activator can return a default server status message or custom page when a client performs an HTTP GET
. Network routing devices such as load balancers, content switches and system monitors can hit the servlet periodically. The response indicates Activator server and all network components in between are operational.
To use this feature, the server must be running and a community must be set up. The community must have a delivery for receiving messages from partners that uses an embedded HTTP server. For information about configuring a community, see Communities.
You can retrieve the default server status message with a URL in the following format:
http://<host>:<port>/ServerStatus
Host is the name or IP address of the computer running Activator server. Unless it has been changed, use 4080 as the port. This is the default port of embedded HTTP servers (see Embedded transport servers).
You can point a browser to the URL to manually inspect the status message. The default message is ServerStatus=OK
. To refresh the page, press Control while selecting Refresh to force the browser cache to clear.
Instead of the default message, you can design a status file with any content you like. When you use the server status URL, your file is displayed. You can use this feature to have external systems generate a more comprehensive or sophisticated status page.
The name and path of the custom file are controlled by the filereg.xml
file in <install directory>\conf
. The following are the default settings:
<File name="serverstatus.html"path="conf/serverstatus.html" />
To use the default configuration for the custom file, create an HTML document and save it as serverstatus.html
. Copy the file to <install directory>\conf
.
You do not have to use an HTML file. You can use any file type you want and you can use any file name. If you do, change the path attribute in filereg.xml
to conform to your file name and location. However, do not edit the name attribute. This value must remain as serverstatus.html.