Keycloak health endpoints 404

I have a keycloak 11.0.3 server and am trying to enable the health check endpoints, however with using both

ENV KEYCLOAK_HEALTH_ENABLED true
ENV KEYCLOAK_METRICS_ENABLED true
ENV KC_HEALTH_ENABLED true
ENV KC_METRICS_ENABLED true

in the container, and passing the same via ansible to the container on launch (environment variables confirmed set within the running container by logging in), the /health endpoints return 404

Anything I’m missing?

By default in Keycloak under some version, not sure which, but it include yours, there is a /auth context path, so you may miss that before /health?

Hmm… I’ve tried a number of different endpoint urls, including:

/auth/realms/REALM/health, /auth/health, etc… and I’m still getting 404 :confused:

Is there an example path I could try?

AFAIR, in that early version there was no dedicated health endpoint, yet.
The configuration you are using (KC_HEALTH_ENABLED) is only valid for recent versions (since 17?) of Keycloak.

I think, in 11, you would just can query the /auth path. If you get an 2xx response, it is kind of “ok”'ish.

Metrics was definitely not available in 11, only since 17.

However, running version 11 is more than insecure. It’s years old, outdated and gets no more updates. Do yourself (and your boss, company, customer, whatever) a favor and do an upgrade to the most recent version!