Management Endpoints
nevisLogRend provides a liveness endpoint and a readiness endpoint on a dedicated management port. Use them to detect the current state of an instance, for example to configure container probes in Kubernetes.
To configure the probes in Kubernetes, see the Kubernetes documentation on liveness, readiness, and startup probes. Use the paths and the api-version header described on this page.
The management endpoints are disabled by default. To enable them, set management.healthchecks.enabled to true. See Configuration.
Endpoints
The endpoints are served over plain HTTP on the management port and support only the GET method. The default management port is 8997.
| Endpoint | Purpose | Default URL |
|---|---|---|
/liveness | Reports whether the instance is running. | http://hostname:8997/liveness |
/readiness | Reports whether the instance is ready to handle requests. | http://hostname:8997/readiness |
API Versioning
The response format of /liveness and /readiness depends on the api-version request header.
| Header value | Response |
|---|---|
2.0 | JSON response (status and checks) compatible with the wire format and JSON payload of MicroProfile Health 4.0. |
1.0 | Legacy response, identical to the response of the legacy endpoints. |
| Missing, empty, or unsupported | The configured default version. |
The default version is 2.0. You can change it with management.healthchecks.default-api-version. See Configuration.
Responses contain the following headers:
| Header | Description |
|---|---|
api-version | The API version that was used for the response. |
Vary | Always api-version. |
Cache-Control | Always no-store. |
Liveness
The liveness endpoint reports whether the instance is up and running. The instance can be running but not ready to handle requests, for example because of a misconfiguration. Use readiness to detect that.
| Aspect | Value |
|---|---|
| URL | http://hostname:8997/liveness |
| Method | GET |
Response, api-version 2.0 | JSON object with status UP and an empty checks list. See the example. |
Response, api-version 1.0 | JSON object with status UP. See the example. |
| HTTP status code | 200 (OK) |
| HTTP status code on processing failure | 500 (Internal Server Error) |
Readiness
The readiness endpoint reports whether the instance is ready to handle requests. nevisLogRend is ready if a valid login application configuration is loaded. If the check fails, orchestrators such as Kubernetes stop routing traffic to the instance.
| Aspect | Value |
|---|---|
| URL | http://hostname:8997/readiness |
| Method | GET |
Response, api-version 2.0 | JSON object with status and a loginApplication check in checks. See the examples. |
Response, api-version 1.0 | JSON object with status UP or DOWN. See the examples. |
| HTTP status code if ready | 200 (OK) |
| HTTP status code if not ready | 503 (Service Unavailable) |
HTTP status code on processing failure, api-version 2.0 | 500 (Internal Server Error) |
HTTP status code on processing failure, api-version 1.0 | 503 (Service Unavailable) |
The readiness result is the combination of the following checks:
| Check | Available | Description |
|---|---|---|
loginApplication | Always | A valid login application configuration is loaded. |
With api-version 1.0, the checks are not part of the response.
Legacy Endpoints (Deprecated)
The legacy endpoints are deprecated and are removed in November 2027. Use /liveness and /readiness instead.
| Endpoint | Replacement | Served on |
|---|---|---|
/nevislogrend/health | /readiness | The server port (server.port), using the protocol configured in server.protocol. |
/nevislogrend/liveness | /liveness | The management port, using plain HTTP. |
The legacy endpoints are available only if management.healthchecks.enabled is true.
The legacy endpoints always return the 1.0 response and ignore the api-version request header. Responses contain the Deprecation and Sunset headers.
Configuration
Configure the management endpoints in logrend.properties. Changes to the properties take effect after a restart. See also Server configuration properties.
| Property | Description |
|---|---|
management.Mandatory: No Default: 8997 | Management port. Only HTTP is supported. |
management.Mandatory: Yes, to use the endpoints Default: false | Enables the management endpoints. |
management.Mandatory: No Default: 2.0 | API version used if the api-version request header is missing, empty, or unsupported. Allowed values: 1.0, 2.0. An invalid value is ignored with a warning. |
Example:
management.server.port=8997
management.healthchecks.enabled=true
management.healthchecks.default-api-version=2.0
Response Examples
Liveness
API version 2.0
Alive (HTTP status code 200):
{
"status": "UP",
"checks": []
}
API version 1.0
Alive (HTTP status code 200):
{
"status": "UP"
}
Readiness
API version 2.0
Ready (HTTP status code 200):
{
"status": "UP",
"checks": [
{
"name": "loginApplication",
"status": "UP"
}
]
}
Not ready (HTTP status code 503):
{
"status": "DOWN",
"checks": [
{
"name": "loginApplication",
"status": "DOWN"
}
]
}
API version 1.0
Ready (HTTP status code 200):
{
"status": "UP"
}
Not ready (HTTP status code 503):
{
"status": "DOWN"
}