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

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...