Splunk Search

How to exclude multiple values from multiple fields?

rnikam1412
Loves-to-Learn Everything

I am trying to filter multiple values from two fields but not getting the expected result.

index=test_01 EventCode=4670 NOT (Field 1 = value1 OR Field 1 = value2) NOT (Process_Name = value 3 OR Process_Name = value 4)

 

I am geting splunk results which includes Process_Name=value 3 and Process_Name=value 4

Labels (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

Are you sure your value 3 and value 4 do not contain, for example, white space?  I cannot help but notice that you did not quote "value 3" and "value 4".  If the search is illustrative, it should be something like

index=test_01 EventCode=4670 NOT ("Field 1" = value1 OR "Field 1" = value2) NOT (Process_Name = "value 3" OR Process_Name = "value 4")
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your search looks OK - can you share some of the events (anonymised of course) which are being found which shouldn't be?

0 Karma
Get Updates on the Splunk Community!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...