aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
530 stars 152 forks source link

CLIENT_LOGIN and CLIENT_LOGIN_ERROR should be reported using keycloak_logins and keycloak_failed_login_attempts #59

Closed RossierFl closed 3 years ago

RossierFl commented 4 years ago

Description

The events CLIENT_LOGIN and CLIENT_LOGIN_ERROR are currently exported as keycloak_user_event_CLIENT_LOGIN and keycloak_user_event_CLIENT_LOGIN_ERROR. With those metrics, only the realm is exposed, it's not possible to get the client_id. So we know only the number of CLIENT_LOGIN against a realm and not who connected through the metrics.

Expected Behavior

I would suggest to export those metrics using the same keycloak_logins and keycloak_failed_login_attempts or create keycloak_client_logins and keycloak_failed_client_login_attempts to easily track those login including the client_id information in the metrics.

For the moment, on my side I added both events in the switch case present in MetricsEventListener. That's the only change needed BTW.

Do you want me to create a PR with this change ?

hypery2k commented 4 years ago

would also like to see the ip of a causing event, would be especially interesting for failed login attemps

pb82 commented 3 years ago

closing as fixed in #85