aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
551 stars 156 forks source link

"metrics-listener" does not appear in Events Config #105

Closed gustavoortega closed 2 years ago

gustavoortega commented 3 years ago

Description

After deploy keycloak-metrics-spi-2.3.1.jar, option "metrics-listener" not appear

Expected Behavior

After deploy the file keycloak-metrics-spi-2.3.1.jar, and restart keycloak (i am using v12.0.4), the "metrics-listener" does not appear on the Event Listeners option

Actual Behavior

After deploy the file keycloak-metrics-spi-2.3.1.jar, and restart keycloak (i am using v12.0.4), the "metrics-listener" does not appear on the Event Listeners option The endpoint $KEYCLOAKIP/auth/realms/master/metrics return some data, but not the relevated to keycloak logins, refresh token to code, etc. image

Yesterday, it worked for some minutes, and today, i cant do it work anyway. I tried downgrading the spi, keycloak version, and using a new database, but nothings works.

Environment

Steps to reproduce

Install keycloak, copy the keycloak-metrics-spi-2.3.1.jar to /opt/keycloak/standalone/deployments Start keycloak The logs: 2021-04-22 16:09:40,618 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0001: Content added at location /opt/keycloak/standalone/data/content/f9/fd8d6ad6d13f4acafdec76a6343928020f580a/content 2021-04-22 16:09:40,624 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "keycloak-metrics-spi-2.3.1.jar" (runtime-name: "keycloak-metrics-spi-2.3.1.jar") 2021-04-22 16:09:40,720 INFO [org.keycloak.subsystem.server.extension.KeycloakProviderDeploymentProcessor] (MSC service thread 1-2) Deploying Keycloak provider: keycloak-metrics-spi-2.3.1.jar 2021-04-22 16:09:40,729 WARN [org.keycloak.services] (MSC service thread 1-2) KC-SERVICES0047: metrics (org.jboss.aerogear.keycloak.metrics.MetricsEndpointFactory) is implementing the internal SPI realm-restapi-extension. This SPI is internal and may change without notice 2021-04-22 16:09:40,794 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010: Deployed "keycloak-metrics-spi-2.3.1.jar" (runtime-name : "keycloak-metrics-spi-2.3.1.jar")

Looking providers in the web server info of Keycloak, does not appear too. image

sennetheunisporphy commented 3 years ago

Facing the same issue with version 2.4.0 -> Resolved

I am now using 2.4.0 together with Keycloak version 10.0.1.

I'm running it in a docker and copy the jar like this: RUN curl -L https://github.com/aerogear/keycloak-metrics-spi/releases/download/2.4.0/keycloak-metrics-spi-2.4.0.jar -o /opt/jboss/keycloak/standalone/deployments/keycloak-metrics.jar

On the dashboard going to Manage -> Events image

Dockerfile looks like this:

FROM jboss/keycloak:10.0.1
RUN curl -L  https://github.com/aerogear/keycloak-metrics-spi/releases/download/2.4.0/keycloak-metrics-spi-2.4.0.jar -o  /opt/jboss/keycloak/standalone/deployments/keycloak-metrics.jar

CMD ["-b", "0.0.0.0","-Dkeycloak.profile=preview","-Dkeycloak.profile.feature.upload_scripts=enabled"]
pb82 commented 2 years ago

@gustavoortega have you tried it with more recent versions?

gustavoortega commented 2 years ago

No, I do not have the opportunity because I no longer have access to the productive instance. You may proceed to close this topic, thank you for asking.