Getting Data In

How to create a report about each index and the sourcetypes it contains?

giy4
Engager

I need to create a report that shows each index on my system and the relevant data about sourcetypes within the index. I know I can use |metadata type=sourcetypes index=myindex and get the information for a specific index, but I want to basically pull all of my indexes and run that command for each of the indexes I have.

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Ok, so here you go. This uses the rest command, and the metadata command. It will increase in execution time as the number of indexes increases.

|rest /services/data/indexes count=0 | dedup title | fields title | map  [|metadata type=sourcetypes index="$title$" | eval type="$title$"] maxsearches=1000 | stats values(totalCount) by sourcetype type | rename type as index
Get Updates on the Splunk Community!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

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

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...