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!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...