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!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...