# Get user events for security monitoring

**URL:** <https://forum.keycloak.org/t/get-user-events-for-security-monitoring/29507>\
**Category:** Miscellanaeous\
**Created:** [January 29, 2025, 3:01pm UTC](https://forum.keycloak.org/t/get-user-events-for-security-monitoring/29507 "2025-01-29T15:01:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tester123](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tester123](https://forum.keycloak.org/u/Tester123)\
**Post date:** [January 29, 2025, 3:01pm UTC](https://forum.keycloak.org/t/get-user-events-for-security-monitoring/29507/1 "2025-01-29T15:01:56Z")

</div>

Hello,

Has anyone worked on getting the user events to an external system/file for security monitoring? If so, can you help me with it ? My objective is to get the user events like logouts/logins etc to a file so it can then be read by our software running in the system.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [January 29, 2025, 8:17pm UTC](https://forum.keycloak.org/t/get-user-events-for-security-monitoring/29507/2 "2025-01-29T20:17:27Z")

</div>

1. There is a built in event listener that logs events to the log file. It can be enabled in the “Realm Settings → Events” tab by adding `jboss-logging` to the event listeners. ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/a/a448e3789b265f299cf112c7511692fa2d860af0.png)
2. You can also implement your own `EventListenerProvider` to capture and do whatever you want with the events. Docs and examples here:
  - [Server Developer Guide](https://www.keycloak.org/docs/latest/server_development/index.html#_events)
  - [keycloak-quickstarts/extension/event-listener-sysout at main · keycloak/keycloak-quickstarts · GitHub](https://github.com/keycloak/keycloak-quickstarts/tree/main/extension/event-listener-sysout)

3. I’ve got a few extensions for externalizing events via HTTP and webhooks. Repo here:
  - [GitHub - p2-inc/keycloak-events: Useful Keycloak event listener implementations and utilities.](https://github.com/p2-inc/keycloak-events)
