Management Endpoints
nevisMeta provides two management endpoints that you can use to detect the current state of the instance. These can for example be used to integrate with Kubernetes container probes. They are disabled by default and can be enabled by setting the property management.healthchecks.enabled to true. Check the Kubernetes documentation for how to configure the liveness and readiness probes.
The Kubernetes integration is only supported by the standalone deployment of nevisMeta using nevisAdmin.
Liveness Endpoint
The liveness endpoint informs whether the server is up and running. Note that the server can be up and running but not ready to properly handle requests (for instance because of a misconfiguration). The endpoint is accessible via the management port. You configure this port with the management.server.port property as described in the server configuration properties. Currently only HTTP is supported.
The following table describes the HTTP API of the liveness endpoint:
| Description | Example |
|---|---|
| URL with the default management port | http://hostname:9005/liveness |
| Request HTTP method | GET |
| Response content-type | application/json |
| Response body if nevisMeta is alive | {"status":"UP"} |
| HTTP status code if nevisMeta is alive | 200 (OK) |
Readiness Endpoint
The readiness endpoint informs whether the server is ready to handle requests. nevisMeta is ready if it can reach its database. The endpoint is accessible via the management port. You configure this port with the management.server.port property as described in the server configuration properties. Currently only HTTP is supported.
The readiness endpoint always answers with the HTTP status code 200 (OK), also if nevisMeta is not ready. To detect whether nevisMeta is ready, you have to inspect the response body. A standard Kubernetes httpGet probe only checks the HTTP status code, so use an exec probe or another body-aware check that inspects the response.
The following table describes the HTTP API of the readiness endpoint:
| Description | Example |
|---|---|
| URL with the default management port | http://hostname:9005/health |
| Request HTTP method | GET |
| Response content-type | application/json |
| Response body if nevisMeta is ready | {"status":"UP"} |
| HTTP status code if nevisMeta is ready | 200 (OK) |
| Response body if nevisMeta is not ready | {"health is":"DOWN"} |
| HTTP status code if nevisMeta is not ready | 200 (OK) |