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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...