Splunk Search

is there a logical OR available for searching?

Path Finder

This has to be splunk 101.

There has be something better than

NOT sourcetype=top NOT sourcetype=ps NOT sourcetype=openPorts

Something along the lines of

NOT sourcetype in (top, ps, openPorts)


Thanks for the help!

Oh .. and one more question, there's a shortcut to insert "NOT sourcetype=blah" by holding down a key combination and mouse clicking on the "blah" in the current search results. What is the key combination on both windows and mac? Thanks.

Tags (3)


Hi di2esysadmin,

well, your example is not an OR search, it is an AND search. The AND directive is implied between terms, so you do not need to write it - this means

`foo AND bar`

is the same like this

`foo bar`

Back to your question: to search for multiple OR statements you can do something like this:

`NOT ( sourcetype="top" OR sourcetype="ps" OR sourcetype="openPorts" )`

Please see the docs on writing better searches, where you can see that one should avoid NOT searches but instead search for event you want. NOT searches will have negative performance impact on long time searches.

Regarding the keyboards shortcuts, find information in the docs about Keyboard_navigation_using_Firefox_and_Mac_OS_X

hope this helps ...

cheers, MuS


Concerning the NOT sourcetype=blah key combination, that used to be Alt+Click in the Splunk<=5 flashtimeline view, but for me that stopped working in the Splunk 6 search view. It's probably going to be fixed in the next major version as per http://answers.splunk.com/answers/109473/alt-click-not-working-selected-fields

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...