Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data for some metrics #193

Open
noze-gnassipova opened this issue Feb 9, 2024 · 4 comments
Open

No data for some metrics #193

noze-gnassipova opened this issue Feb 9, 2024 · 4 comments

Comments

@noze-gnassipova
Copy link

noze-gnassipova commented Feb 9, 2024

Description

There's no data for some metrics:
Screenshot 2024-02-09 at 12 38 59 PM

Expected Behavior

Should show values for metrics

Environment

Dev

  • Keycloak 23.0.6
  • SPI metrics 5.0.1

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

@tolleiv
Copy link

tolleiv commented May 21, 2024

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.

@noze-gnassipova
Copy link
Author

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.

@Mr-Folder
Copy link

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```

@noze-gnassipova
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants