Splunk Search

How to search for who and when accessed the server?

New Member


I would like to search who (user) and when accessed the server (server_name)

I make a search like this but I don't get the right results.

dest="server_name" user="*" src="*" | table _time user src dest action

Can please somebody help me.

0 Karma


This depend on whether the server is Windows, unix, or something else.

To research this, use your own userid and the name of a server that you normally log on to, run a verbose search like this...

index=* "myserver" "myuserid"

Look at the results you get for the data and time you last logged on.

If it's Windows, you will be looking at an event 4624 (or some older ones in the 500 series).

If it's Unix, you will probably be looking at a PAM accepted record or something similar.

If it's an IBM mainframe, it will be a RACF record.

Look at the fields that are available on that record. Maybe you've misspelled them, or mis-capitalized them, or something. Maybe they just aren't there.

If that isn't enough to solve your problem, then update your question details showing the form of the record, with any confidential information masked. Change ip to or, host name to myhost.mycompany.com, userid to myuserid... stuff like that.

We'll get you through this.

0 Karma


marked code. Also, in general, you should always put the index name in your code.

0 Karma


What results are you getting and what do you expect to get?

If this reply helps you, Karma would be appreciated.
0 Karma

New Member

I get:

_time user src dest action
2017-08-09 14:36:04 n/a server-02 server-01 blocked
2017-08-09 11:41:09 n/a server-02 server-01 blocked
2017-08-09 09:55:21 n/a server-02 server-01 blocked

I'm supposed to get the users(usernames) who connect to server-01 (destination).
Am I missing something?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...