Liveness check
GET
/livez
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("http://localhost:8080/livez")) .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'http://localhost:8080/livez';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/livezThe process is alive and answers HTTP. It reads neither the database nor the engine, so a database outage never fails it; use it as the liveness probe.
Responses
Section titled “ Responses ”The process is alive
Media typeapplication/json
object
status
required
string
Example
{ "status": "UP"}