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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...