<?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: Calculate time avg time and std deviation between log entries in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-time-avg-time-and-std-deviation-between-log-entries/m-p/101130#M182818</link>
    <description>&lt;P&gt;Use streamstats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   sourcetype=myweblog 
   | streamstats window=1 global=f current=f
       last(Timestamp) as next_ts
     by Src_IP,URL
   | eval tm_to_next=next_ts-Timestamp
   | stats 
       avg(tm_to_next)
       stdev(tm_to_next)
     by Src_IP,URL 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 08 Dec 2010 15:07:54 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-12-08T15:07:54Z</dc:date>
    <item>
      <title>Calculate time avg time and std deviation between log entries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-time-avg-time-and-std-deviation-between-log-entries/m-p/101129#M182817</link>
      <description>&lt;P&gt;I am trying to average calculate the time between web log entries. If an IP on the network visits the same URL multiple times in a given time period we want to calculate the average time between visits. I cant really do a transaction (at least I dont think so) because the events are the same..no begin or end.&lt;/P&gt;

&lt;P&gt;I have a search that groups the IP's that visit a URL more than once and also grabs the log entries for each time the URL is visited.&lt;/P&gt;

&lt;P&gt;The fields in the output are:&lt;/P&gt;

&lt;P&gt;Timestamp, Src_IP, URL, Count&lt;/P&gt;

&lt;P&gt;Now for the fun part. Once average time is calculated we want to calculate standard deviation.&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2010 11:32:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-time-avg-time-and-std-deviation-between-log-entries/m-p/101129#M182817</guid>
      <dc:creator>tradecraft1914</dc:creator>
      <dc:date>2010-12-08T11:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate time avg time and std deviation between log entries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-time-avg-time-and-std-deviation-between-log-entries/m-p/101130#M182818</link>
      <description>&lt;P&gt;Use streamstats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   sourcetype=myweblog 
   | streamstats window=1 global=f current=f
       last(Timestamp) as next_ts
     by Src_IP,URL
   | eval tm_to_next=next_ts-Timestamp
   | stats 
       avg(tm_to_next)
       stdev(tm_to_next)
     by Src_IP,URL 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:07:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-time-avg-time-and-std-deviation-between-log-entries/m-p/101130#M182818</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-12-08T15:07:54Z</dc:date>
    </item>
  </channel>
</rss>

