Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

30/03/2023, 11:03 Enabling Keycloak Health checks - Keycloak

Guides / Server / Enabling Keycloak Health checks

Enabling Keycloak Health


checks
Learn how to enable and use Keycloak health checks

Keycloak has built in support for health checks. This guide describes how to enable and use the
Keycloak health checks.

Keycloak Health checks


Keycloak exposed health endpoints are three:

/health

/health/live

/health/ready

The result is returned in json format and it looks as follows:

{
"status": "UP",
"checks": []
}

Enabling the health checks


It is possible to enable the health checks using the build time option health-enabled :

bin/kc.[sh|bat] build --health-enabled=true

By default, no check is returned from the health endpoints.

https://www.keycloak.org/server/health 1/2
30/03/2023, 11:03 Enabling Keycloak Health checks - Keycloak

Available Checks
The table below shows the available checks.

Check Description Requires Metrics

Database Returns the status of the Yes


database connection pool.

For some checks, you’ll need to also enable metrics as indicated by the Requires Metrics
column. To enable metrics use the metrics-enabled option as follows:

bin/kc.[sh|bat] build --health-enabled=true --metrics-enabled=true

Relevant options
Value

 health-enabled  true , false


If the server should expose health check endpoints. (default)

On this page

Keycloak Health checks


Enabling the health checks
Available Checks
Relevant options

 Edit this guide

Sponsored by

https://www.keycloak.org/server/health 2/2

You might also like