Splunk Search

How to search for the users logging into a server that have never logged in before.

ntalwar
New Member

Working on real time data.I want to search for users logging into the server that have never logged before.

Tags (1)
0 Karma
1 Solution

harsmarvania57
Ultra Champion

Hi @ntalwar,

I'll prefer below steps to achieve this.

1.) Create CSV file which contains list of users who already logged into the server previously ( If you have this data in splunk you can fetch those data and generate lookup).
2.) Upload that csv in Splunk.
3.) Run you search to find users who logging into server and compare that against csv file which you have uploaded in splunk (Using lookup command)
4.) Filter users who are not in lookup file (Something like | where isnull(lookup_user) )
5.) Once you have result you can run this as scheduled search to send result over email and in same query I'll use outputlookup in last to update existing lookup file which contains logged in user details so in future when query will run it will not generate result against those newly logged in user.

I hope this helps.

Thanks,
Harshil

View solution in original post

0 Karma

harsmarvania57
Ultra Champion

Hi @ntalwar,

I'll prefer below steps to achieve this.

1.) Create CSV file which contains list of users who already logged into the server previously ( If you have this data in splunk you can fetch those data and generate lookup).
2.) Upload that csv in Splunk.
3.) Run you search to find users who logging into server and compare that against csv file which you have uploaded in splunk (Using lookup command)
4.) Filter users who are not in lookup file (Something like | where isnull(lookup_user) )
5.) Once you have result you can run this as scheduled search to send result over email and in same query I'll use outputlookup in last to update existing lookup file which contains logged in user details so in future when query will run it will not generate result against those newly logged in user.

I hope this helps.

Thanks,
Harshil

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...