Open noze-gnassipova opened 4 months ago
This is normal behaviour when the Keycloak instance has not seen related events after the startup. Once a related event happens, this metric will jump from empty to 1.
This is normal behaviour when the Keycloak instance has not seen related events after the startup. Once a related event happens, this metric will jump from empty to 1.
I don't think so. I tested with failed client login attempts, but I still don't see any metrics.
To enable the event listener via the GUI interface, go to Manage -> Events -> Config. The Event Listeners configuration should have an entry named metrics-listener.
To enable the event listener via the Keycloak CLI, such as when building a Docker container, use these commands.
$ /opt/jboss/keycloak/bin/kcadm.sh config credentials --server http://localhost:8080/auth --realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD
$ /opt/jboss/keycloak/bin/kcadm.sh update events/config -s "eventsEnabled=true" -s "adminEventsEnabled=true" -s "eventsListeners+=metrics-listener"
$ /usr/bin/rm -f /opt/jboss/.keycloak/kcadm.config```
You probably didn't enabled the event listener
To enable the event listener via the GUI interface, go to Manage -> Events -> Config. The Event Listeners configuration should have an entry named metrics-listener.
To enable the event listener via the Keycloak CLI, such as when building a Docker container, use these commands.
$ /opt/jboss/keycloak/bin/kcadm.sh config credentials --server http://localhost:8080/auth --realm master --user $KEYCLOAK_USER --password $KEYCLOAK_PASSWORD $ /opt/jboss/keycloak/bin/kcadm.sh update events/config -s "eventsEnabled=true" -s "adminEventsEnabled=true" -s "eventsListeners+=metrics-listener" $ /usr/bin/rm -f /opt/jboss/.keycloak/kcadm.config```
It's enabled; the picture is attached. Thanks for the response though.
Description
There's no data for some metrics:![Screenshot 2024-02-09 at 12 38 59 PM](https://github.com/aerogear/keycloak-metrics-spi/assets/140452987/efda8f6d-06b1-4010-8934-d880f3fbffd9)
Expected Behavior
Should show values for metrics
Environment
Dev
Steps to reproduce
jar file is present, metrics-listener was enabled for all realms, KC_METRICS_ENABLED: "true"![Screenshot 2024-02-09 at 12 45 42 PM](https://github.com/aerogear/keycloak-metrics-spi/assets/140452987/bf458e75-0d82-4bdf-9099-d077dfff3f1b)