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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...