Open Wolfsrudel opened 2 years ago
Hi @Wolfsrudel, I'm interested by an upgrade to KC17 too (or may be KC18 in a few days)... Did you had a chance to resolve these naming issues?
No. I also assume with difficulty that something needs to be done here in terms of programming. A "simple" adjustment in terms of configuration doesn't seem to be enough.
As answered by @thomasdarimont on keycloak-dev mailing list:
you can already define custom health checks as CDI components for Keycloak-legacy and Keycloak.X if metrics are enabled. See: https://github.com/thomasdarimont/keycloak-project-example/blob/main/keycloak/extensions/src/main/java/com/github/thomasdarimont/keycloak/custom/health/CustomHealthChecks.java
Using Kubernetes, I need to check if our devops are able to check responsiveness directly with these metrics but, if not, I think we can replace the DB datasource lookup in DatabaseHealthIndicator by:
protected DataSource lookupDataSource() throws Exception { return CDI.current().select(DataSource.class).get(); }
Thanks for the heads-up. I just updated the health-checks for Keycloak 17.0.1 with support for Keycloak-Legacy and Keycloak.X.
You rock! I will try this tomorrow.
I was able to use this under Keycloak.X, 17.0.1. The health check URL is now /realms/$realm/health/check
, but it otherwise seems to report useable metrics. Is details.infinispan.healthStatus
just a rollup of the details.infinispan.cacheDetails[].healthStatus
?
I tried to deploy the module/ provider in a new Keycloak 17.0.0 installation. To do this I took the following steps:
The provider is deployed and works for
filesystem
but not fordatabase
andinfinispan
. The following error appears:The database connection is controlled by configuration file (
<keycloak_home>/conf/keycloak.conf
) and environment variables.I assume that the module has to be adapted for 17.0.0. Am I right?