<?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 Re: How do I count the number of sourcetypes being collected for specific indexes and hosts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169476#M48437</link>
    <description>&lt;P&gt;If you're on Splunk 6.1 OR above, we have very fast, sorry, lightening fast method to get this information using "tstats" command.&lt;/P&gt;

&lt;P&gt;Sample usage&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=* by index, host, sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For count of sourcetypes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats dc(sourcetype) as sourcetypes WHERE index=* by index, host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Aug 2015 15:01:46 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-08-12T15:01:46Z</dc:date>
    <item>
      <title>How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169472#M48433</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need to run a report for specific indexes and hosts that show the number of sourcetypes being collected for a specific time frame.   How would I do that?  &lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169472#M48433</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-08-12T14:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169473#M48434</link>
      <description>&lt;P&gt;Are you going to define the indexes and host?  Are you saying show me the sourcetypes for index=A OR index=B and host=AA Or host=BB?  Or are you looking for in the last 60 minutes show me all of the indexes getting data by any host and then also show me the sourcetypes that were logged?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169473#M48434</guid>
      <dc:creator>treinke</dc:creator>
      <dc:date>2015-08-12T14:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169474#M48435</link>
      <description>&lt;P&gt;There are probably a few ways to do that, depending on your data and how many indexes and hosts you want in the report.  For example,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* | stats dc(sourcetype) as SourceTypes by index,host | table index host SourceTypes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will report the number of sourcetypes for all indexes and hosts.  You can limit the results by adding to the base search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=foo OR index=bar) (host=system1 OR host=system2) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169474#M48435</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-08-12T14:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169475#M48436</link>
      <description>&lt;P&gt;You might want to use tstats for that....something like&lt;/P&gt;

&lt;P&gt;| tstats count where index=blah (host=somehost OR host=someotherhost OR host=something*) by sourcetype&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 14:54:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169475#M48436</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2015-08-12T14:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169476#M48437</link>
      <description>&lt;P&gt;If you're on Splunk 6.1 OR above, we have very fast, sorry, lightening fast method to get this information using "tstats" command.&lt;/P&gt;

&lt;P&gt;Sample usage&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=* by index, host, sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For count of sourcetypes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats dc(sourcetype) as sourcetypes WHERE index=* by index, host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Aug 2015 15:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169476#M48437</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-12T15:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169477#M48438</link>
      <description>&lt;P&gt;That counts the number of events by sourcetype.  I believe the OP was looking for a count of sourcetypes.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 15:05:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169477#M48438</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-08-12T15:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169478#M48439</link>
      <description>&lt;P&gt;Oops, updated the search to meet that requirement.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 15:11:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169478#M48439</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-12T15:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the number of sourcetypes being collected for specific indexes and hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169479#M48440</link>
      <description>&lt;P&gt;yes, index=euc* host=lync*  &lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 15:31:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-count-the-number-of-sourcetypes-being-collected-for/m-p/169479#M48440</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-08-12T15:31:18Z</dc:date>
    </item>
  </channel>
</rss>

