Health Check
The /actuator/health
endpoint is used to check the health or state of the running application.
It’s usually exercised by monitoring software to alert us if the running instance goes down or gets unhealthy for other reasons, e.g.,
connectivity issues with our DB, lack of disk space, etc.
The actuator health check endpoint can be used to test the installation. Once DB2Rest has been installed, the following GET
requests
will inform the status of the server.
- cURL
- HTTPie
curl --request GET \
--url http://[IP_ADDRESS]:8080/actuator/health \
--header 'User-Agent: insomnia/8.6.1'
http GET http://[IP_ADDRESS]:8080/actuator/health \
User-Agent:insomnia/8.6.1
The actuator health check service in DB2Rest will return the following response:
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
{
"status": "UP"
}
The status
value of UP
confirms that the service is up and running.