Splunk Search

How to compare two fields between two lookups?

kiran331
Builder

Hello

How to compare two lookups with by two fields? I have two fields: host and process in both lookup1 and lookup2. I have to compare to get the processes which are not in lookup1 by host?

Tags (3)
0 Karma

somesoni2
Revered Legend

Try like this

|inputlookup lookup1.csv | lookup lookup2.csv host process OUTPUT process as testfield | where isnull(testfield)

OR

|inputlookup lookup1.csv | search NOT [ |inputlookup lookup2.csv | table host process]
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...