Splunk Search

How to find which indexes are used?

Siddharthnegi
Contributor

I have a simple question how can I check that in which of the apps a particular index has been used.

0 Karma
1 Solution

PickleRick
SplunkTrust
SplunkTrust

There is no 100% reliable way. There are some common cases which can be covered but you can only detect some typical cases where the indexes are specified explicitly. I can think of so many ways of specifying indexes dynamically (even generating index names randomly) that you can't find it automaticaly.

But the question is why do you even need that.

View solution in original post

SinghK
Builder

there is no easy way of doing it but check the macros an app uses and then in that macro normally there is  a search which points to an index. settings-->advanced search-->search macros and there you can find the index being used by app.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Simply look at the source of all your dashboards, reports, alerts, macros, etc. to see if the index is used.

isoutamo
SplunkTrust
SplunkTrust

Hi

unfortunately there haven't (at least i didn't know) any way to get this list for 100%. There are so many way how used index can be defined for queries. @ITWhisperer already list some of those, but if there is used index=xy* or index=* or if the index is not mentioned on SPL query or macro or event types then splunk will use what has defined for user's role (or combined roles) as default search index.

Basically you could get some list for used indexes, but don't trust that it contains all, unless it contains all indexes what you have defined on your system 😉

r. Ismo

PickleRick
SplunkTrust
SplunkTrust

There is no 100% reliable way. There are some common cases which can be covered but you can only detect some typical cases where the indexes are specified explicitly. I can think of so many ways of specifying indexes dynamically (even generating index names randomly) that you can't find it automaticaly.

But the question is why do you even need that.

Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...