IT Operations Discussions
All the up-time. All the nines.

query to know who has logged in the server

risingflight143
Explorer

Hi All

i am new to splunk, I have a server with hostname server01 and i want to know who has logged in to the server in last 1 month. the event id is 4624 for successfully login, how can i use splunk query to fetch the information for last logged in user .

0 Karma

manjunathmeti
Champion

hi @risingflight143,

You need to provide sample data. You can use this sample query:

index=indexname sourcetype=sourcetypename eventid_fieldname=4624 earliest=-1mon
| fields  userfield, logintime, other_fields_you_need
| stats latest(_time) as _time, latest(*) as * by userfield
0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...