3.10 HealthCheck

Use this Knowledge Script to verify that WebSphere Application Server is running, and that a user-specified servlet running on the server is able to respond to requests. You can specify that an event be raised if the servlet response time exceeds a specified threshold. You can also specify that the server should be restarted if it is not running.

In order to test for the application server’s ability to respond to requests, and to measure the server’s responsiveness, you must supply the URL of a servlet to query. In addition, you can optionally specify a string expected to be found in the document returned from the query. The URL must be an HTTP URL, and must be a GET, and not a POST, request. It is not required that the URL point to the local computer on which the health check is being performed, nor is it required that the URL point to a servlet. However, querying a remote URL will effectively check the health of the remote server, rather than the server on which the Knowledge Script runs. This may be useful in cases where you want to measure the response time of a servlet running on one server from the point of view of one or more other servers.

If security is enabled on the WebSphere Application Server, you must use AppManager Security Manager to update the AppManager repository to provide the WebSphere Application Server account information that is required to start the application server.

If you are running the agent with a non-root account on WebSphere Application Server 8.0 or 8.5, ensure you have applied all required WebSphere Application Server fixes to start the server. Refer to the IBM support site regarding this problem http://www.ibm.com/support/docview.wss?uid=swg1PM63269.

3.10.1 Resource Object

WebSphere Application Server

3.10.2 Default Schedule

The default interval for this script is Every 15 Minutes.

3.10.3 Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

Event? (y/n)

Set to y to raise an event if a threshold is exceeded. The default is y.

Collect data? (y/n)

Set to y to collect data for reports and graphs. The default is n.

Event severity when the application server is not running

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the application server is not running. The default is 10.

Restart application server if not running? (y/n)

Set to y to restart the application server if it is not running. The default is n.

Start time limit

Set to the number of seconds within which WebSphere Application Server should complete initialization. The default is 300.

URL of servlet to test server responsiveness

Specify an HTTP GET URL to be accessed in order to test whether the server is able to respond to requests in a timely manner. Leave blank if you do not want to test server responsiveness.

Event severity when the servlet is not responding to requests

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the servlet is not responding to requests. The default is 10.

Text expected to be found in servlet response

Specify a string that should be found in the response text returned by the servlet. You can specify that an event be raised if this text is not found in the response. Leave this field empty if you do not want to validate the servlet response.

Event severity when text not found in servlet response

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the servlet response does not include the text you specify. The default is 25.

Servlet response time threshold

Specify a threshold value greater than or equal to -1. Use -1 to ignore this threshold. If the response time (in seconds) exceeds this threshold, an event is raised. The default is -1.

Event severity when servlet response time exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the response time (in seconds) exceeds this threshold. The default is 25.