Splunk Search

Return only events where field value is in lookup table

bcarr12
Path Finder

Hi all,

I am running a search that returns many events. Some of these events contain a field value that is also in a lookup table I have uploaded. What is the best way to format my search in such a way that it ONLY returns events where the field value in the event is present in the lookup table? Right now, the lookup itself works, but the search returns all events, whether it can look up the field value or not.

Thanks!

jkat54
SplunkTrust
SplunkTrust
 index=myindex [ | inputlookup lookupname.csv | fields field1 field2 field3 | format] | ... rest of search

This will make a huge or statement with each of your fields:

 index=myindex ((field1=value) OR (field2=value2) OR field3=value3))

Add a NOT in front of the sub search if you want events that do not match fields&values in the lookup.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...