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!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

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

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...