aerogear / keycloak-metrics-spi

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

adding metric for total login attempts #93

Closed xinau closed 3 years ago

xinau commented 3 years ago

Motivation

issue: #92

this change adds a metric keycloak_login_attempts for the total number of login attempts. it might seem that it's possible to sum both keycloak_logins and keycloak_failed_login_attempts but as the totalLogins and totalFailedLoginAttempts are counted separately their is now guarantee that both counters contain the same metrics (labels with same values). in order to make it possible to calculate the failure rate per instance a new counter totalLoginAttempts is introduced.

Checklist:

Progress

Screenshot

image

pb82 commented 3 years ago

@xinau Why not use a selector that ignores the labels (or some of them) to build the sum?

xinau commented 3 years ago

@pb82 the problem with ignoring labels is that it's still not helpful as shown in the folliwng screenshot. the problem still remains. without filtering all labels their can still be a margin of error >40%. image

pb82 commented 3 years ago

this looks good @xinau Sorry for the delay, will add this to the next release

xinau commented 3 years ago

@pb82 thanks. :)

pb82 commented 3 years ago

thanks @xinau