<?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: timechart vs. streamstats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58488#M14318</link>
    <description>&lt;P&gt;Yes, I want to see how many "not seen before on this day" user IDs are coming online on an hourly basis through the day.&lt;/P&gt;

&lt;P&gt;Without the sort, it appears to work correctly but the graph is backwards - i.e, the highest count for streamstats is at the start, which means all the deltas/dc values are backwards.&lt;/P&gt;

&lt;P&gt;If I sort it, it appears to truncate the results - i.e, I will only see values for a fraction of the time span, and this does not make sense as there are events across the whole timespan, all have userids.&lt;/P&gt;

&lt;P&gt;Basically I want streamstats to run forward in time the same way it does for an rtsearch.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Sep 2010 07:22:46 GMT</pubDate>
    <dc:creator>blilburne</dc:creator>
    <dc:date>2010-09-27T07:22:46Z</dc:date>
    <item>
      <title>timechart vs. streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58486#M14316</link>
      <description>&lt;P&gt;If I do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="foo" sourcetype="bar" | sort _time | streamstats dc(userid) as dcusers | delta dcusers as deltadcusers
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives me a 0 on the event if the user has been seen before, or 1 if the user is a new user.&lt;/P&gt;

&lt;P&gt;But then if I:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart sum(deltadcusers)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It starts out looking right, then progressively collects backwards until there is only one data point at the start containing the same value as stats dc(userid) for the whole time window.&lt;/P&gt;

&lt;P&gt;If I leave out the sort _time, then the streamstats command gives values backwards from what I want - it streams backwards in time, I want it streamed forwards from the start of the day.&lt;/P&gt;

&lt;P&gt;This doesn't seem right at all, how do I/can I get streamstats and timechart to interact in a sane way in this sort of scenario?&lt;/P&gt;</description>
      <pubDate>Sat, 25 Sep 2010 04:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58486#M14316</guid>
      <dc:creator>mctester</dc:creator>
      <dc:date>2010-09-25T04:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: timechart vs. streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58487#M14317</link>
      <description>&lt;P&gt;so what does the output of&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="foo" sourcetype="bar" | sort _time | streamstats dc(userid) as dcusers | delta dcusers as deltadcusers | timechart sum(deltadcusers)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;look like?&lt;/P&gt;

&lt;P&gt;Seems like you want to get a chart of how many new users you are getting for each time span?&lt;/P&gt;</description>
      <pubDate>Sat, 25 Sep 2010 04:54:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58487#M14317</guid>
      <dc:creator>steveyz</dc:creator>
      <dc:date>2010-09-25T04:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: timechart vs. streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58488#M14318</link>
      <description>&lt;P&gt;Yes, I want to see how many "not seen before on this day" user IDs are coming online on an hourly basis through the day.&lt;/P&gt;

&lt;P&gt;Without the sort, it appears to work correctly but the graph is backwards - i.e, the highest count for streamstats is at the start, which means all the deltas/dc values are backwards.&lt;/P&gt;

&lt;P&gt;If I sort it, it appears to truncate the results - i.e, I will only see values for a fraction of the time span, and this does not make sense as there are events across the whole timespan, all have userids.&lt;/P&gt;

&lt;P&gt;Basically I want streamstats to run forward in time the same way it does for an rtsearch.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2010 07:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58488#M14318</guid>
      <dc:creator>blilburne</dc:creator>
      <dc:date>2010-09-27T07:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: timechart vs. streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58489#M14319</link>
      <description>&lt;P&gt;This appears to do what I want:&lt;/P&gt;

&lt;P&gt;... | dedup userid sortby +_time | timechart count&lt;/P&gt;

&lt;P&gt;This does not:&lt;/P&gt;

&lt;P&gt;... | sort +_time | dedup userid | timechart count&lt;/P&gt;

&lt;P&gt;Streamstats doesn't have a sortby so it appears not to be possible to do the same with streamstats (change the direction in which they are streamed).&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2010 07:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-vs-streamstats/m-p/58489#M14319</guid>
      <dc:creator>blilburne</dc:creator>
      <dc:date>2010-09-28T07:25:27Z</dc:date>
    </item>
  </channel>
</rss>

