Splunk Search

How to run an index to generate events through an input lookup table?

charlottecl
Engager

Hi all, 

I wish to generate login times for a list of users which are specified in a lookup table titled user_list.csv. The column header of the list of users in this list is called "IDENTITY".

Currently, I have an index that on its own without inserting the lookup table, already has a field called "Identity". This index itself gives me any users' login times within the specified timeframe as long as I specify Identity="*". Without specifying Identity="*" or any other user's names, the events will not populate.

What I am trying to do is to input a specified list of users and be able to check their login times. However when I use the following search query, I end up getting 0 events:

 

index=logintime 

[|inputlookup user_list.csv

|fields IDENTITY

|format]

IDENTITY="*"

| table _time, eventType, ComputerName, IDENTITY

 

I have already checked that the lookup table is within the same app. Please help, thank you.

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Field names are case-sensitive.  The 'IDENTITY="*"' line is not needed because the subsearch will produce a list of IDENTITY values to locate.

index=logintime [|inputlookup user_list.csv
  | rename IDENTITY as Identity
  | fields Identity
  | format ]
| table _time, eventType, ComputerName, Identity

 

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

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Field names are case-sensitive.  The 'IDENTITY="*"' line is not needed because the subsearch will produce a list of IDENTITY values to locate.

index=logintime [|inputlookup user_list.csv
  | rename IDENTITY as Identity
  | fields Identity
  | format ]
| table _time, eventType, ComputerName, Identity

 

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

charlottecl
Engager

Thanks a lot! I tried this and it works. Turns out that I have to rename first before adding it as a field.

Tags (1)
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...