<?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: What this query will do? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367654#M108417</link>
    <description>&lt;P&gt;streamstats basically grabs all of the previous events within the set parameters. you are not setting a window to only grab the previous event, or previous 10 events (&lt;CODE&gt;window=10&lt;/CODE&gt;), so it'll search all previous events. &lt;CODE&gt;current=f&lt;/CODE&gt; will exclude the current event. it does this for every event in your dataset. so your search will grab the latest seen &lt;CODE&gt;up&lt;/CODE&gt; value from every event before the current event and add a field called &lt;CODE&gt;oldUP&lt;/CODE&gt; to the current event, by lowername.&lt;BR /&gt;
something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;up  lowername   oldUP
foo1    bar1    
foo2    bar1    foo1
foo3    bar1    foo2
foo4    bar1    foo3
foo5    bar1    foo4
foo6    bar1    foo5
foo7    bar2    
foo8    bar2    foo7
foo1    bar2    foo8
foo2    bar2    foo1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Streamstats"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Streamstats&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2018 11:47:20 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2018-03-22T11:47:20Z</dc:date>
    <item>
      <title>What this query will do?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367653#M108416</link>
      <description>&lt;P&gt;streamstats current=f latest(up) as oldUP by lowername&lt;BR /&gt;
I am bit confused what will streamstats calculate here? &lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 07:57:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367653#M108416</guid>
      <dc:creator>harshal94</dc:creator>
      <dc:date>2018-03-22T07:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: What this query will do?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367654#M108417</link>
      <description>&lt;P&gt;streamstats basically grabs all of the previous events within the set parameters. you are not setting a window to only grab the previous event, or previous 10 events (&lt;CODE&gt;window=10&lt;/CODE&gt;), so it'll search all previous events. &lt;CODE&gt;current=f&lt;/CODE&gt; will exclude the current event. it does this for every event in your dataset. so your search will grab the latest seen &lt;CODE&gt;up&lt;/CODE&gt; value from every event before the current event and add a field called &lt;CODE&gt;oldUP&lt;/CODE&gt; to the current event, by lowername.&lt;BR /&gt;
something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;up  lowername   oldUP
foo1    bar1    
foo2    bar1    foo1
foo3    bar1    foo2
foo4    bar1    foo3
foo5    bar1    foo4
foo6    bar1    foo5
foo7    bar2    
foo8    bar2    foo7
foo1    bar2    foo8
foo2    bar2    foo1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Streamstats"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Streamstats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 11:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367654#M108417</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-03-22T11:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: What this query will do?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367655#M108418</link>
      <description>&lt;P&gt;Hi @harshal94,&lt;/P&gt;

&lt;P&gt;In this search streamstats  calculating latest value of &lt;CODE&gt;up&lt;/CODE&gt; field by lowername. Here you will get &lt;CODE&gt;oldUP&lt;/CODE&gt; as new filed.  Here you set current=false &amp;amp; If current=false, the search uses the field value from the previous event. &lt;/P&gt;

&lt;P&gt;Please check below doc for more information.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Streamstats"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/SearchReference/Streamstats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 11:51:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-this-query-will-do/m-p/367655#M108418</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-03-22T11:51:09Z</dc:date>
    </item>
  </channel>
</rss>

