<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to list all sourcetypes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494251#M137793</link>
    <description>&lt;P&gt;I am trying to list all sourcetypes in an index using dc&lt;BR /&gt;
Using  &lt;CODE&gt;index="test" | stats dc(sourcetype) as sourcetypes&lt;/CODE&gt;only shows the total number of sourcetypes but does not list them individually.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 09:52:31 GMT</pubDate>
    <dc:creator>ialahdal</dc:creator>
    <dc:date>2019-10-09T09:52:31Z</dc:date>
    <item>
      <title>How to list all sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494251#M137793</link>
      <description>&lt;P&gt;I am trying to list all sourcetypes in an index using dc&lt;BR /&gt;
Using  &lt;CODE&gt;index="test" | stats dc(sourcetype) as sourcetypes&lt;/CODE&gt;only shows the total number of sourcetypes but does not list them individually.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 09:52:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494251#M137793</guid>
      <dc:creator>ialahdal</dc:creator>
      <dc:date>2019-10-09T09:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494252#M137794</link>
      <description>&lt;P&gt;To list them individually you must tell Splunk to do so. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test" | stats count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternative commands are&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sourcetypes index=test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=test by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Oct 2019 11:45:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494252#M137794</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-09T11:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to list all sourcetypes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494253#M137795</link>
      <description>&lt;P&gt;What I was looking for is closer to &lt;CODE&gt;index="test" | stats dc(sourcetype) by sourcetype&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;but thanks I was able to find this because of your answer.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 05:24:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-all-sourcetypes/m-p/494253#M137795</guid>
      <dc:creator>ialahdal</dc:creator>
      <dc:date>2019-10-14T05:24:51Z</dc:date>
    </item>
  </channel>
</rss>

