<?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: Transaction to Streamstats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518037#M145693</link>
    <description>&lt;P&gt;the events are long and span hours if not close to a day... but the beginning of the event starts with the generating line and ends with a completed log line. The problem is that if server 1 picks up job A and runs for 28hrs. Then server 2 will pick up job A 12 hours into server 1's run. This is fine b/c they are different servers. BUT now the issue comes in ~24hours after server1 starts is that its time for the next run, and server 1 again on a different thread picks up that run. So its the same server1 and same job A but its start and end should be different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yet whats happening is my streamstats for the first event computes the event end as the end for the last (latest) run.&lt;/P&gt;</description>
    <pubDate>Sat, 05 Sep 2020 16:09:06 GMT</pubDate>
    <dc:creator>tb5821</dc:creator>
    <dc:date>2020-09-05T16:09:06Z</dc:date>
    <item>
      <title>Transaction to Streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/517251#M145432</link>
      <description>&lt;P&gt;I'm trying to move from using a transaction command to a streamstats - I get most of the way there but I can't figure out the 'reset' with streamstats to proper group starts and ends together. Here's my current query which isn't finding the right end time since my BY query will match multiple places and the latest(_time) will change to the wrong latest time but yet the actual latest time ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="logfiles" appType=reports* "Generating * Status Report" | rex \.(?&amp;lt;reportName&amp;gt;Generate\w*) 
| eval reportName=replace (reportName,"Generate","")
| eval reportName=replace (reportName,"Report","")
| streamstats earliest(_time) as stime by reportName appType
| join appType,reportName [search index="logfiles" appType=reports* "Report generated successfully" | rex \.(?&amp;lt;reportName&amp;gt;\w+)ReportGenerator
| streamstats reset_on_change=true reset_after="("searchmatch(\"Report generated successfully\")")" latest(_time) as etime BY reportName appType]
| eval diff=etime-stime
| eval hhmmss=tostring(diff, "duration")
| convert timeformat=" %a  %b  %d %I:%M:%S.%3N %p %Z" ctime(stime) as StartTime
| table StartTime appType reportName hhmmss
|rename hhmmss as RunDuration&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2020 14:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/517251#M145432</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2020-09-01T14:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction to Streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/517940#M145671</link>
      <description>&lt;P&gt;anyone?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 16:34:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/517940#M145671</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2020-09-04T16:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction to Streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/517942#M145673</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/117048"&gt;@tb5821&lt;/a&gt;&amp;nbsp;Do you have some sample events you can share to show what you are dealing with?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 17:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/517942#M145673</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-04T17:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction to Streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518037#M145693</link>
      <description>&lt;P&gt;the events are long and span hours if not close to a day... but the beginning of the event starts with the generating line and ends with a completed log line. The problem is that if server 1 picks up job A and runs for 28hrs. Then server 2 will pick up job A 12 hours into server 1's run. This is fine b/c they are different servers. BUT now the issue comes in ~24hours after server1 starts is that its time for the next run, and server 1 again on a different thread picks up that run. So its the same server1 and same job A but its start and end should be different.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yet whats happening is my streamstats for the first event computes the event end as the end for the last (latest) run.&lt;/P&gt;</description>
      <pubDate>Sat, 05 Sep 2020 16:09:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518037#M145693</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2020-09-05T16:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction to Streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518090#M145704</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/117048"&gt;@tb5821&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By events I meant splunk event e.g. log entries. What is the data you are trying to process with splunk?&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 08:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518090#M145704</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-06T08:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction to Streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518118#M145716</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/117048"&gt;@tb5821&lt;/a&gt;&amp;nbsp;for the community to assist you better please provide more details like some sample (cooked up event, should have masking and anonymization for any sensitive data). Also provide your current SPL with transaction command which is also doing the job (but I am guessing it is not performing).&lt;/P&gt;</description>
      <pubDate>Sun, 06 Sep 2020 17:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-to-Streamstats/m-p/518118#M145716</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-06T17:26:25Z</dc:date>
    </item>
  </channel>
</rss>

