Overview

In a multi-server environment, an external load balancer needs to determine the health of each server of a cluster. A server's health is one important aspect for selecting best server for incoming requests. For basic server monitoring, the application login /pim/webaccess page can be used, however, this page doesn't take the server startup and shutdown period into account. Especially in the scenario of graceful shutdown, where the servers first finishes all running jobs before terminating, it is important that the health status is reflecting the unavailability of the server for new incoming requests correctly.

Health Status Page

The health status page indicates if clients can connect to the server. You do not need any authentication to access this status page. The health status can be accessed with the URI /public/V1.0/health.

Example

Request:

curl -i -X GET http://localhost:1512/public/V1.0/health

Response (when clients can connect):

HTTP/1.1 200 OK
Content-Type: text/plain
 
Server state: RUNNING

Response Code

Description

200

Clients can connect to the sever.

503

The server is starting or shutting down and no client can connect to this server.

Server state will be displayed in the response body.

Info REST API

For a more sophisticated health check, load balancers can also query the REST endpoint /rest/V1.0/manage/system/info. In this case, consumers of this API need to be able to provide authentication and parse the HTTP response.

Example

curl -X GET http://localhost:1512/rest/V1.0/manage/system/info -H 'Authorization: Basic cmVzdDpoZWlsZXI='
HTTP/1.1 200 OK
{
"state": "RUNNING",
"runLevel": "STD_READY",
"identifier": "pim-server1",
"runtimeInfo": {
"freeMemory": 747502440,
"allocatedMemory": 1790967808,
"maximumMemory": 1908932608,
"availableProcessors": 8
},
"connectedNodes": [],
"userInfo": {
"loginName": "portal"
}
}