Splunk Search

how can i list all indexes and sourcetypes?!

r999
Path Finder

i can do

| metadata type=sourcetypes |table sourcetype

but what i would like is the equivalent of:

| metadata type=sourcetypes index=* | table index sourcetype

however this does not work and does not enter data in the index column

How can i achieve this very simple list, preferably without using stats command

martin_mueller
SplunkTrust
SplunkTrust

You can get a list of indexes like this:

 | eventcount summarize=f index=* index=_* | dedup index | fields index

See http://splunk-base.splunk.com/answers/39370/is-it-possibl-to-get-a-list-of-available-indices

Your search doesn't work because metadata does not contain any field "index". It does give you the list of sourcetypes though.

Micheal_S
Path Finder

This search worked better for me over the other tstats searches. The tstats search would generate errors over too long a time. 

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 ...