Splunk Search

How to search all indexes except for a particular few?

rewritex
Contributor

Is there a way to search in all indexes except for a couple?
An example is I have about 100 index but don't want to search for sea1, sea2, sea3, sea4
Ex. index=* (not sea1, sea2, sea3, sea4) <keyword>

Thank You

Tags (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this.

index=* NOT (index=sea1 OR index=sea2 OR index=sea3 OR index=sea4) ...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try this.

index=* NOT (index=sea1 OR index=sea2 OR index=sea3 OR index=sea4) ...
---
If this reply helps you, Karma would be appreciated.

rewritex
Contributor

Worked! Thank you...

0 Karma

ppablo
Retired

Hi @rewritex

Glad you were able to find the solution you needed through @richgalloway 🙂 In addition to upvoting the user that helped you, always remember to resolve your posts by clicking "Accept" directly below the answer that solved your question. This will make it easier to find for other users with similar issues. Thanks!

0 Karma
Get Updates on the Splunk Community!

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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...