Server status
You can check server status using the PingAuthorize Server administrative console, the status
command, or the availability servlet.
Administrative console
You can access status information in the console, in the Status tab.
For information about how to access the console, see PingAuthorize administrative console.
status
command
The PingAuthorize distribution includes the bin/status
command that you can use to see various information about the server, including its status and the status of its LDAP external servers.
Availability servlet
There are cases in which you might want to obtain basic information about the state of the server over HTTP, or ideally, HTTPS. These might include:
-
When server HTTP endpoints are fronted by a load balancer capable of issuing and interpreting the results of HTTP requests for health-checking purposes.
-
When using an orchestration framework such as Kubernetes, you can assess the current state of the server to determine if the instance is in a state that is ready to be used or if it has encountered an issue that has caused it to become degraded or unavailable. In this case,you can call the availability servlet in a liveness or readiness probe.
To assist with this, the PingAuthorize server includes an availability state HTTP servlet that you can use to determine whether the server considers itself to be available, degraded, or unavailable. You can access the servlet using the GET, POST, or HEAD methods, and the servlet returns a configurable status code and an optional JSON-encoded response body that you can use to determine the server’s self-assessed health state.
The availability state HTTP servlet extension supports two configuration properties for the JSON response body:
-
include-response-body
: Indicates whether the servlet response should include a JSON object. If enabled, the response will include anavailability-state
field with a default value ofAVAILABLE
,DEGRADED
, orUNAVAILABLE
. This configuration property allows a value of eithertrue
orfalse
. -
additional-response-contents
: Provides a JSON-formatted string containing additional fields for the servlet to include in its response.
Use dsconfig
to update the HTTP servlet extension configuration:
dsconfig set-http-servlet-extension-prop \ --extension-name {name} \ (--set|--add|--remove) {propertyName}:{propertyValue}
There are two instances of this servlet configured by default:
-
One that uses a path of
/available-state
that returns an HTTP status code of 200 (OK) if the server considers itself available or an HTTP status code of 503 (Service Unavailable) if the server considers itself degraded or unavailable -
One that uses a path of
/available-or-degraded-state
that returns an HTTP status code of 200 if the server considers itself available or degraded or an HTTP status code of 503 if the server considers itself unavailable
The server’s assessment of its health state is based on the presence of any unavailable or degraded alert types that are active in the server. If the server currently has one or more unavailable alert types, then it considers itself unavailable. If the server does not have any unavailable alert types but has one or more degraded alert types, then it considers itself degraded. If the server does not have any unavailable or degraded alert types, then it considers itself available.