{
"status": "UP",
"checks": []
}
Keycloak has built in support for health checks. This guide describes how to enable and use the 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": []
}
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.
The table below shows the available checks.
Check | Description | Requires Metrics |
---|---|---|
Database |
Returns the status of the database connection pool. |
Yes |
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
Type | Default | |||||
---|---|---|---|---|---|---|
|