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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...