Splunk Search

Comparison of field values with a lookup?

zacksoft_wf
Contributor

I have a field in my database datamodel called 'os.user'. And I have a lookup called 'userAccount'.  'userAccount' look up has a field called 'user' that is same as the 'os.user' field of database DM.

I want to know if all of my 'os.user' values are present in the 'userAccount' lookup.  

My requierment is to know if my lookup is sufficient and contains all the user values 'os.user'.

Could use some guisance on the SPL

Labels (4)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @zacksoft_wf,

you have to run a simple search like this:

| from datamodel:your_datamodel
| search NOT [ inputlookup userAccount | rename user AS os.user | fields os.user ]
| table ...

remember that the output fields of the subsearch must be the same of the main search.

Ciao.

Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @zacksoft_wf,

you have to run a simple search like this:

| from datamodel:your_datamodel
| search NOT [ inputlookup userAccount | rename user AS os.user | fields os.user ]
| table ...

remember that the output fields of the subsearch must be the same of the main search.

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @zacksoft_wf,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

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

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...