<?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: Average response time, and count, by url path in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127923#M34723</link>
    <description>&lt;P&gt;shouldn't this &lt;CODE&gt;avg(num(responsetime))&lt;/CODE&gt; be like &lt;CODE&gt;avg(tonumber(responsetime))&lt;/CODE&gt; ?&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jul 2014 06:33:46 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2014-07-02T06:33:46Z</dc:date>
    <item>
      <title>Average response time, and count, by url path</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127922#M34722</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to create a table that shows me the number of times a URL is requested for and what its average response time is (for a given time period).&lt;/P&gt;

&lt;P&gt;The events that contain the relevant information (url path, response time) look like this:&lt;BR /&gt;
2014-07-02 16:04:26,716  INFO 8767 --- [p-1328426564-28] user=[                    ] a.c.n.a.a.c.filters.RequestTimingFilter  : Returning statusCode=[200] after time=[19ms] for method=[GET] path=[/atlas/v1/assets/adhoc/fsam/2LJT-07] queryString=[] userDn=[uid=GRAHAMHISCOCK,ou=internal users,ou=nbn,dc=nbnco,dc=com,dc=au] &lt;/P&gt;

&lt;P&gt;In the above example, the url path is "/atlas/v1/assets/adhoc/fsam/2LJT-07" and the response time is 19 milliseconds. &lt;/P&gt;

&lt;P&gt;The search I used is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;path v1 | rex field=_raw "time=\[(?&amp;lt;responsetime&amp;gt;.*?)ms\]" | stats count,avg(num(responsetime)) by path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, this seems to show me only the path and count, not average response time (this field is blank) &lt;/P&gt;

&lt;P&gt;path                                                            count   avg(num(responsetime))&lt;/P&gt;

&lt;P&gt;[/atlas/v1/status/health]                           46&lt;BR /&gt;&lt;BR /&gt;
[/atlas/v1/boundaries/fsam]                 18&lt;BR /&gt;&lt;BR /&gt;
[/atlas/v1/assets/adhoc/fsam/2BLK-01]   17  &lt;/P&gt;

&lt;P&gt;Any ideas how I can obtain this information?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;BR /&gt;
Hans&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 06:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127922#M34722</guid>
      <dc:creator>hdus001</dc:creator>
      <dc:date>2014-07-02T06:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Average response time, and count, by url path</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127923#M34723</link>
      <description>&lt;P&gt;shouldn't this &lt;CODE&gt;avg(num(responsetime))&lt;/CODE&gt; be like &lt;CODE&gt;avg(tonumber(responsetime))&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 06:33:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127923#M34723</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-07-02T06:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Average response time, and count, by url path</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127924#M34724</link>
      <description>&lt;P&gt;Just tried the same search with 'tonumber' instead of 'num'. Still has the same problem.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 06:40:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127924#M34724</guid>
      <dc:creator>hdus001</dc:creator>
      <dc:date>2014-07-02T06:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Average response time, and count, by url path</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127925#M34725</link>
      <description>&lt;P&gt;Why use any function at all? &lt;CODE&gt;responsetime&lt;/CODE&gt; should already be numeric if correctly extracted. If it's not correctly extracted, then that's the problem that needs to be solved.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 07:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127925#M34725</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-07-02T07:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Average response time, and count, by url path</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127926#M34726</link>
      <description>&lt;P&gt;Yup that fixed it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ...No need to use 'num' or 'tonumber' as its already a number!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 07:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127926#M34726</guid>
      <dc:creator>hdus001</dc:creator>
      <dc:date>2014-07-02T07:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Average response time, and count, by url path</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127927#M34727</link>
      <description>&lt;P&gt;so, now you're able to accept this as the answer &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 07:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-response-time-and-count-by-url-path/m-p/127927#M34727</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-07-02T07:39:44Z</dc:date>
    </item>
  </channel>
</rss>

