Splunk Enterprise Security

Update a Lookup Table with Identity information coming from our index "elist"

MikeVenable
Path Finder

I need to update a Lookup Table with Identity information coming from our index "elist", I am trying get the search to take the events from the elist and compare it to the current lookup table, If the identity already exists in the lookup table then it will not add anything, but if doesn't it will add it. But also I would like it to check the end Date and if not null it will add the new information. This is what I have so far. the eList and the Lookup have different fields so I have to rename everything to match. Thanks!

index="elist" | search LoginID="MV123456" | rename LoginID AS identity, NickName AS nick, FirstName AS first, LastName AS last, Email AS email, SupName AS managedBy, DeptName AS bunit, JobTitle AS category, HireDate AS startDate, TermDate AS endDate, ST AS work_location, Phone AS phone| table identity, prefix, nick, first, last, suffix, email, phone, managedBy, priority, bunit, category, watchlist, startDate, endDate, work_location, work_country | outputlookup simple_identity_lookup append=t

0 Karma
1 Solution

jawaharas
Motivator

Try below SPL.

index="elist" 
| search LoginID="MV123456" 
| rename LoginID AS identity, NickName AS nick, FirstName AS first, LastName AS last, Email AS email, SupName AS managedBy, DeptName AS bunit, JobTitle AS category, HireDate AS startDate, TermDate AS endDate, ST AS work_location, Phone AS phone 
| table identity, prefix, nick, first, last, suffix, email, phone, managedBy, priority, bunit, category, watchlist, startDate, endDate, work_location, work_country 
| search NOT 
    [| inputlookup simple_identity_lookup 
    | table identity]
| outputlookup simple_identity_lookup append=t

View solution in original post

0 Karma

jawaharas
Motivator

Try below SPL.

index="elist" 
| search LoginID="MV123456" 
| rename LoginID AS identity, NickName AS nick, FirstName AS first, LastName AS last, Email AS email, SupName AS managedBy, DeptName AS bunit, JobTitle AS category, HireDate AS startDate, TermDate AS endDate, ST AS work_location, Phone AS phone 
| table identity, prefix, nick, first, last, suffix, email, phone, managedBy, priority, bunit, category, watchlist, startDate, endDate, work_location, work_country 
| search NOT 
    [| inputlookup simple_identity_lookup 
    | table identity]
| outputlookup simple_identity_lookup append=t
0 Karma

jawaharas
Motivator

@MikeVenable
Can you accept the answer if it's helped you? Thanks.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...