Runtime health checking
A health API endpoint can be used to monitor the general system health of a runtime.
The health of a runtime is checked using the "/api/health" API endpoint.
To check runtime health, perform a standard HTTP GET request against the health endpoint, for example:
GET HTTP://[localhost:port]/api/health
The returned status response code provides further details of the runtime health, and if any component errors are present:
-
HTTP 200 OK: Indicates that the runtime system is healthy and running as expected.
-
HTTP 500 Internal Server Error: Indicates that an error is present in a component. Details of the error are provided in the response.
For example, an error response may be returned such as:
[2019-06-04T15:52:51.8436170+01:00 INF] Request starting HTTP/1.1 GET http://localhost:22936/api/health
[2019-06-04T15:53:21.8550728+01:00 ERR] An error happened while health checking the database:
Unable to read data from the transport connection: Connection timed out.
[2019-06-04T15:53:51.9359683+01:00 INF] Request finished in 60092.3496ms 500