Since Payara Server 4.1.2.181 and 5.181
Provided version of the API: {{ book.mpHealthSpecUrl }}[MicroProfile Health Check {{ book.mpHealthVersion }}]
The Health Check API was created to allow easier probing of the state of computing nodes with a cloud infrastructure environment.
A full overview for the reasoning behind the API can be found in the README for the source code repository.
{{ book.mpHealthSpecUrl }}[The complete specification] is maintained in the same repository.
The MicroProfile Healthchecks API defines that a REST endpoint are available from the root context at /health
by default, and that upon invocation all registered health checks are performed and the results aggregated.
This endpoint can be altered using the set-microprofile-healthcheck-configuration
asadmin command to prevent collisions with other HTTP endpoints that might need to use the health
context root.
Note
|
This endpoint will not be available until at least one application has been deployed. |
The following administration commands can be used to configure the MicroProfile Healthcheck service:
Since Payara Server 4.1.2.182 and 5.182
- Usage
-
asadmin set-microprofile-healthcheck-configuration --enabled=<true|false> --endpoint=<context-root> --target=<target[default:server]>
- Aim
-
Enables or disables the MicroProfile healthcheck service and configures the endpoint where all registered health checks are exposed.
Option | Description | Default | Mandatory |
---|---|---|---|
|
Enables or disables the service |
true |
No |
|
The context root used to expose the health checks |
health |
No |
|
The target configuration where the command should be run |
server |
No |
Important
|
Changes made with this command will only be applied when the server or instance is restarted. |