<?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: Counting Events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111750#M29289</link>
    <description>&lt;P&gt;Thanks, you're welcome&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jun 2014 18:23:07 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-06-20T18:23:07Z</dc:date>
    <item>
      <title>Counting Events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111746#M29285</link>
      <description>&lt;P&gt;Splunk Community,&lt;/P&gt;

&lt;P&gt;I’d like to be able to count the number of events I have per SourceFile when my sourcetype is LogFile:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sourcetype="LogFile"  SourceFile="File1”&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I also have a number of other SourceFiles (“File2” , “File3” …etc…)&lt;/P&gt;

&lt;P&gt;I’ve tried a number of things with no success as of yet – does anyone know how would I be able to count the number of events, per SourceFile within the SourceType “LogFile”?&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2014 15:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111746#M29285</guid>
      <dc:creator>MichaelCohen829</dc:creator>
      <dc:date>2014-06-19T15:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111747#M29286</link>
      <description>&lt;P&gt;Hi MichaelCohen829,&lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="LogFile" OR SourceFile="File*" | stats count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2014 16:04:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111747#M29286</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-06-19T16:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111748#M29287</link>
      <description>&lt;P&gt;Counting and filtering by metadata fields such as &lt;CODE&gt;source&lt;/CODE&gt; and &lt;CODE&gt;sourcetype&lt;/CODE&gt; can be done much more quickly with &lt;CODE&gt;tstats&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=yourindex sourcetype="LogFile" by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/SearchReference/tstats"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.1/SearchReference/tstats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2014 19:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111748#M29287</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-06-19T19:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111749#M29288</link>
      <description>&lt;P&gt;Thank you MuS - this achieved exactly what I wanted!&lt;/P&gt;

&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 18:20:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111749#M29288</guid>
      <dc:creator>MichaelCohen829</dc:creator>
      <dc:date>2014-06-20T18:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111750#M29289</link>
      <description>&lt;P&gt;Thanks, you're welcome&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2014 18:23:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Counting-Events/m-p/111750#M29289</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-06-20T18:23:07Z</dc:date>
    </item>
  </channel>
</rss>

