Skip to main content
Version: 2.17.x.x LTS

Management service

Starting with 2.18.0, nevisDataPorter provides a new management service, with which operators can monitor and check the health of a nevisDataPorter instance. Additionally, the service allows seamless integration and operation with Kubernetes deployment using nevisAdmin.

By default, the management service is exposed on port "8999". For security reasons, it only listens on localhost. You can set the managementHost and managementPort parameters in the setup part dataporter.xml configuration file. For more information, see "Setup section".

Securing the management service

Note that the management service is only accessible over HTTP. Additional protection is not required, as no sensitive information is propagated in the management service. Additional authentication or tokens are not required either. However, you can modify the network interface and the port the service listens on. It is recommended that you limit access as tightly as possible using firewalls.

Liveness and readiness probes

The goal of the management service is to monitor the health of a nevisDataPorter instance. It provides two separate endpoints, which can be used to check:

  • the liveness of the instance, to indicate if the process should be restarted; and
  • the readiness of the instance, to indicate whether the instance is ready to accept requests.

You can use these endpoints with any monitoring tool that supports HTTP calls. They also make it easier to integrate nevisDataPorter in a Kubernetes orchestration environment.

Kubernetes: Liveness and Readiness Probes

Click here for more information on Kubernetes probes.

Liveness (/liveness)

The liveness probe indicates whether the process should be restarted. If the liveness probe fails, the application is broken and will not recover by itself.

curl --max-time 1 http://localhost:8999/liveness

If the application is alive, the probe returns a JSON response with status code 200:

{status: "UP"}

If the application is broken, the probe times out, or returns a non-200 response.

Readiness (/health)

The readiness probe indicates whether the nevisDataPorter application is up and running and in a good state. If the readiness probe fails, the application is temporary not working. Currently, the readiness probe monitors disk space only.

curl --max-time 1 http://localhost:8999/health

If the application is up and running, the probe returns status code 200 and more details in the response.

{
"status": "UP",
"details": {
"diskSpace": {
"status": "UP",
"details": {
"total": 488868020224,
"threshold": 10485760,
"free": 316831563776
}
}
}
}
// JSON output is reformatted.

If the application is not up and running, the probe times out, or returns a non-200 response with additional details on the failing probes, see the following table.

{
"status": "DOWN",
"details": {
"diskSpace": {
"status": "DOWN",
"details": {
"total": 488868020224,
"threshold": 10485760,
"free": 10285760
}
}
}
} // JSON output is reformatted.

The following table lists the information that is additionally available on the readiness endpoint.

Key in JSONTypeDescription
diskSpace.details
.totalNumber of bytesThe total number of bytes of the disk where server.log.dir resides.
.thresholdNumber of bytesWhen the number of free bytes is below this threshold, the disk space is considered insufficient. The threshold is fixed to 10 MB.
.freeNumber of bytesThe number of bytes free on the disk where server.log.dir resides. There is expected to be at least 10 MB of free disk space.