Search String
| metadata type=sourcetypes index=_internal , what is its meaning here.
Splunk stores all incoming data intotwo type of files (reference page: http://docs.splunk.com/Documentation/Splunk/7.1.1/Indexer/HowSplunkstoresindexes)
1) compressed raw data files
2) metadata/tsidx/index files
The 2nd file provides access to all key metadata information about your data (e.g. host/source/sourcetypes/index and any indexed time extracted fields) . So if you're reporting based on only these metadata infomration, you can use metadata querying commands to get your report much faster as you don't have to go through all raw data.
The metadata
command queries this metadata/tsidx files and generates report for you. The search that you're using says get metadata summary for the index _internal
and the summarization should be done by sourcetypes. So, above command should give your list of all sourcetypes in index=_internal with name of sourcetype, count of events for each sourcetype, epoch timestamp of when the data was first seen/last seen/ recently seen for the sourcetype.
See this for more information on metadata command
http://docs.splunk.com/Documentation/Splunk/7.1.1/SearchReference/Metadata