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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...