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!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...