<?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: How to create and calculate a response time graph? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339403#M100640</link>
    <description>&lt;P&gt;If you want to plot a moving average, perhaps you can use the &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Trendline"&gt;trendline&lt;/A&gt; command. I also like @somesoni2's answer too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your query to return field 
| sort _time
| trendline sma30(responseTime) AS trend
| table _time responseTime trend
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However this answer makes a different assumption about the data. This assumes that you collect responseTime information every 10 seconds. To get a 5-minute average at any point, you would need to average at the prior 30 responseTimes. This is what trendline does.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2017 20:01:11 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2017-04-19T20:01:11Z</dc:date>
    <item>
      <title>How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339394#M100631</link>
      <description>&lt;P&gt;How do i calculate  every 10 seconds, the average response time for the past 5 minutes and plot on a graph.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 16:48:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339394#M100631</guid>
      <dc:creator>maniishpawar</dc:creator>
      <dc:date>2017-04-19T16:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339395#M100632</link>
      <description>&lt;P&gt;let's say that the response time is being taken in a field called &lt;CODE&gt;responseTime&lt;/CODE&gt; and the statement &lt;CODE&gt;calculate every 10 seconds, the average response time for the past 5 minutes and plot on a graph&lt;/CODE&gt; means what is the average response time calculated for 10 sec spans and when watched over last 5 minutes, here is what you can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query to return field responseTime earliest=-5m
| timechart span=10s avg(responseTime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2017 17:52:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339395#M100632</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2017-04-19T17:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339396#M100633</link>
      <description>&lt;P&gt;So at 10:00:00, show average of 09:55:00 to 10:00:00, at 10:00:10, show average of 09:55:10  to 10:00:10,  at 10:00:20, show average of 09:55:20  to 10:00:20,  and so on...?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 18:01:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339396#M100633</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-19T18:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339397#M100634</link>
      <description>&lt;P&gt;little bit confusing, but to me the answer seems providing average on 10 sec window, &lt;BR /&gt;
but the avg is required for previous 5 mins. please correct me if I am wrong.&lt;/P&gt;

&lt;P&gt;so all in all for 1 hour we will 60*6 =360 samples( each at 10s interval) , each showing me the average of past 5 mins from the collected _timestamp.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 18:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339397#M100634</guid>
      <dc:creator>maniishpawar</dc:creator>
      <dc:date>2017-04-19T18:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339398#M100635</link>
      <description>&lt;P&gt;Yes correct&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 18:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339398#M100635</guid>
      <dc:creator>maniishpawar</dc:creator>
      <dc:date>2017-04-19T18:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339399#M100636</link>
      <description>&lt;P&gt;What version of Splunk are you using?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 18:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339399#M100636</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-19T18:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339400#M100637</link>
      <description>&lt;P&gt;we are using splunk cloud&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 19:03:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339400#M100637</guid>
      <dc:creator>maniishpawar</dc:creator>
      <dc:date>2017-04-19T19:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339401#M100638</link>
      <description>&lt;P&gt;You create a dashboard that refreshes every 10 seconds (actually, this is going to be WAY too much flashing, so I suggest every 30 seconds at least) and add a single panel to that dashoard that runs a single search and generates a single-value visualization.  Then you create the search that drives that panel, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Base Search Here earlieast=-5m@m | stats avg(responseTime) AS AvgResponseTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2017 19:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339401#M100638</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-19T19:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339402#M100639</link>
      <description>&lt;P&gt;Assuming Splunk Cloud is using Splunk version 6.4 or above (check Help-&amp;gt; About), give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query to return field responseTime 
| bucket span=10s _time
| streamstats time_window=5m avg(responseTime) as "Average Reponse Time"
| dedup _time | table _time  "Average Reponse Time"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2017 19:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339402#M100639</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-19T19:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339403#M100640</link>
      <description>&lt;P&gt;If you want to plot a moving average, perhaps you can use the &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Trendline"&gt;trendline&lt;/A&gt; command. I also like @somesoni2's answer too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your query to return field 
| sort _time
| trendline sma30(responseTime) AS trend
| table _time responseTime trend
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However this answer makes a different assumption about the data. This assumes that you collect responseTime information every 10 seconds. To get a 5-minute average at any point, you would need to average at the prior 30 responseTimes. This is what trendline does.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339403#M100640</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-04-19T20:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339404#M100641</link>
      <description>&lt;P&gt;Never mind; I missed the "and plot as a graph".&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:05:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339404#M100641</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-04-19T20:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339405#M100642</link>
      <description>&lt;P&gt;For a smidge more accuracy... and ONLY a smidge...we'd probably do the &lt;CODE&gt;bucket&lt;/CODE&gt; after the &lt;CODE&gt;streamstats&lt;/CODE&gt;, and then run it into &lt;CODE&gt;stats&lt;/CODE&gt;... or just ignore the buckets and run it directly into &lt;CODE&gt;timechart&lt;/CODE&gt;, like so ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your query to return fields _time and responseTime over a 15-minute interval 
earliest=-16m@m 
 | sort 0 _time  
 | streamstats time_window=5m avg(responseTime) as avgResponseTime
 | addinfo
 | bin info_max_time as maxtime span=10s 
 | where (_time &amp;gt;= info_min_time+300) and (_time &amp;lt; maxtime)
 | timechart span=10s avg(avgResponseTime) as avgResponseTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... It's probably not absolutely necessary to kill the most recent interval, which will never be 10s long, but we did it anyway in that &lt;CODE&gt;addinfo&lt;/CODE&gt; code.  You know, "belt, suspenders, safety pins and duct tape".  &lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 21:49:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339405#M100642</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-19T21:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339406#M100643</link>
      <description>&lt;P&gt;I tried this query , its showing the results.&lt;BR /&gt;
when I click on one timestamp (10s each) , should this be showing me the events of -5m from that timestamp. &lt;BR /&gt;
As of now, when I clicked lets 4/20/2017 1:20:00 PM timestamp it does not show me the first event being 4/20/2017 1:15:00 PM and last being 4/20/2017 1:20:00 PM &lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 17:28:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339406#M100643</guid>
      <dc:creator>maniishpawar</dc:creator>
      <dc:date>2017-04-20T17:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339407#M100644</link>
      <description>&lt;P&gt;My guess will be no, it won't show you events for 5 min window of the time clicked. It will show the events from time clicked + the timechart span which is 10 sec. For showing results for last 5 min you'll have to setup custom drilldown to take the clicked timestamp and update earliest and latest accordingly.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 20:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339407#M100644</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-20T20:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339408#M100645</link>
      <description>&lt;P&gt;sorry @somesoni2  , i'm here again. what is the equivalent of streamstats in splunk 6.3.3 ?&lt;BR /&gt;
or is there a different way to write this in older splunk version &lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:06:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339408#M100645</guid>
      <dc:creator>maniishpawar</dc:creator>
      <dc:date>2017-04-24T16:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create and calculate a response time graph?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339409#M100646</link>
      <description>&lt;P&gt;Okay, if you are on splunk below 6.4, then &lt;CODE&gt;streamstats&lt;/CODE&gt; won't work for you.  here's an alternate route.  Basically, we copy each record forward into the next twenty-nine 10-second intervals, kill the excess records that go out into the future, and then let &lt;CODE&gt;timechart&lt;/CODE&gt; do all the work.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  your query to return fields _time and responseTime over a 15-minute interval 
 earliest=-16m@m 
  | bin _time span=10s
  | eval fan_time=mvrange(0,300,10)
  | mvexpand fan_time
  | eval _time=_time+fan_time
  | addinfo
  | bin info_max_time as maxtime span=10s 
  | where (_time &amp;gt;= info_min_time+300) and (_time &amp;lt; maxtime)
  | timechart span=10s avg(responseTime) as avgResponseTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:55:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-and-calculate-a-response-time-graph/m-p/339409#M100646</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-24T16:55:51Z</dc:date>
    </item>
  </channel>
</rss>

