[keycloak-user] Configuring event logging in Keycloak
Thomas Darimont
thomas.darimont at googlemail.com
Mon Feb 13 06:20:13 EST 2017
Hello group,
I needed to configure Keycloak to also show success events in the logs
in order to to be able to show the login count over time in a graylog
dashboard.
For this to work I needed to change the log level for the "success-level"
within the keycloak jboss-logging event-listener configuration.
As some other folks might want to do that as well I'd like to share my
jboss-cli config snippet with you.
Cheers,
Thomas
cd $KEYCLOAK_HOME
bin/jboss-cli.sh
# Start keycloak in embedded mode for configuration
embed-server --server-config=standalone-ha.xml --std-out=echo
# Configure jboss-logging event listener
/subsystem=keycloak-server/spi=eventsListener:add(default-provider=jboss-logging)
/subsystem=keycloak-server/spi=eventsListener/provider=jboss-logging:add(enabled=true)
# Propgate success events to INFO instead of DEBUG
# This allows to track successful logins in log analysis
/subsystem=keycloak-server/spi=eventsListener/provider=jboss-logging:write-attribute(name=properties.success-level,value=info)
/subsystem=keycloak-server/spi=eventsListener/provider=jboss-logging:write-attribute(name=properties.error-level,value=warn)
More information about the keycloak-user
mailing list