<?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: streamstats vs. tstats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328169#M97684</link>
    <description>&lt;P&gt;Ohh yeah.. You can use tstats for this. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=euc_network90 sourcetype=era_full_syslog host=myhost by _time span=1d | accum count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure if the streamstats was used correctly there.&lt;/P&gt;</description>
    <pubDate>Fri, 14 Apr 2017 15:32:52 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-04-14T15:32:52Z</dc:date>
    <item>
      <title>streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328165#M97680</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a customer who is using streamstats to validate data is coming into Splunk.  I recommended tstats, and do a count by index/hostname....   Is one approach better than the other?  We want to validate that data is coming in a consistent manner, based upon event counts. &lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:21:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328165#M97680</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2017-04-14T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328166#M97681</link>
      <description>&lt;P&gt;Streamstats is for generating cumulative aggregation on the result and not sure how it was useful to check data is coming to Splunk. The tstats command run on txidx files (metadata) and is lighting faster. So, as long as your check to validate data is coming or not, involves metadata fields or indexed fields, tstats would be the way to go. If you can share the search that customer is using with streamstats, then we can say for sure if tstats can replace that.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:26:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328166#M97681</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-14T15:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328167#M97682</link>
      <description>&lt;P&gt;If you can use &lt;CODE&gt;tstats&lt;/CODE&gt;, then &lt;EM&gt;definitely&lt;/EM&gt; do; it is &lt;EM&gt;much&lt;/EM&gt; more efficient to gather your data from indexed metadata than by mining from inside of the events (buckets).  This is a no-brainer.  The problem is that many things cannot be done with &lt;CODE&gt;tstats&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:26:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328167#M97682</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-14T15:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328168#M97683</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=euc_network90 sourcetype=era_full_syslog host=myhost |streamstats count|timechart span=1d sum(count)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328168#M97683</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2017-04-14T15:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328169#M97684</link>
      <description>&lt;P&gt;Ohh yeah.. You can use tstats for this. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=euc_network90 sourcetype=era_full_syslog host=myhost by _time span=1d | accum count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure if the streamstats was used correctly there.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:32:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328169#M97684</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-14T15:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328170#M97685</link>
      <description>&lt;P&gt;Right, I use tstats.  Trying to explain the different to my customer and why their search isn't correct and what is it actually reporting.  Not quite sure...&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328170#M97685</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2017-04-14T15:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328171#M97686</link>
      <description>&lt;P&gt;Here is how the streamstats is working (just sample data, adding a table command for better representation).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=euc_network90 sourcetype=era_full_syslog host=myhost | table _time |streamstats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will generate data like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time count
xxxxxx 1
xxxxxx 2
xxxxxx 3
xxxxxx 4
....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Adding timechart would actually add this serial number values and would give wrong/much higher count (instead of getting 4 as the event count, the result would show 10).&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 16:04:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328171#M97686</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-14T16:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: streamstats vs. tstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328172#M97687</link>
      <description>&lt;P&gt;If you are looking only for number of events within index,    metadata command would  be better option.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 20:28:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/streamstats-vs-tstats/m-p/328172#M97687</guid>
      <dc:creator>hardikJsheth</dc:creator>
      <dc:date>2017-04-14T20:28:03Z</dc:date>
    </item>
  </channel>
</rss>

