<?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 how to find out average response time for all events by looking at two fields in same event msg ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559542#M158961</link>
    <description>&lt;P&gt;&lt;BR /&gt;I've JSON Object in msg field as :&lt;/P&gt;&lt;P&gt;"objectA":{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"attempts":[&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626329472707,&lt;BR /&gt;"responseTime":1626329474713,&lt;BR /&gt;"status":"FAILURE"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626330378365,&lt;BR /&gt;"responseTime":1626330378622,&lt;BR /&gt;"status":"SUCCESS"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I want to find out Average Total time taken by &lt;STRONG&gt;Successful&lt;/STRONG&gt; responses i.e. in above example second attempts response time should be considered as it's success and not first attempts response time.&lt;BR /&gt;Total time taken = response time - requestTime;&lt;/P&gt;&lt;P&gt;so how to find out :&lt;BR /&gt;1. Average Response of All successful events found&lt;BR /&gt;2. Table with count for response time less than 1sec, between 1 sec to 2 sec, between 2sec to 3 sec, greater than 3 sec&lt;/P&gt;&lt;P&gt;Can you please help with Query ?&lt;/P&gt;&lt;P&gt;Thank you so much for your help and efforts.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jul 2021 07:39:30 GMT</pubDate>
    <dc:creator>splunkDevendra</dc:creator>
    <dc:date>2021-07-15T07:39:30Z</dc:date>
    <item>
      <title>how to find out average response time for all events by looking at two fields in same event msg ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559542#M158961</link>
      <description>&lt;P&gt;&lt;BR /&gt;I've JSON Object in msg field as :&lt;/P&gt;&lt;P&gt;"objectA":{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"attempts":[&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626329472707,&lt;BR /&gt;"responseTime":1626329474713,&lt;BR /&gt;"status":"FAILURE"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626330378365,&lt;BR /&gt;"responseTime":1626330378622,&lt;BR /&gt;"status":"SUCCESS"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;I want to find out Average Total time taken by &lt;STRONG&gt;Successful&lt;/STRONG&gt; responses i.e. in above example second attempts response time should be considered as it's success and not first attempts response time.&lt;BR /&gt;Total time taken = response time - requestTime;&lt;/P&gt;&lt;P&gt;so how to find out :&lt;BR /&gt;1. Average Response of All successful events found&lt;BR /&gt;2. Table with count for response time less than 1sec, between 1 sec to 2 sec, between 2sec to 3 sec, greater than 3 sec&lt;/P&gt;&lt;P&gt;Can you please help with Query ?&lt;/P&gt;&lt;P&gt;Thank you so much for your help and efforts.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 07:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559542#M158961</guid>
      <dc:creator>splunkDevendra</dc:creator>
      <dc:date>2021-07-15T07:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to find out average response time for all events by looking at two fields in same event msg ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559544#M158962</link>
      <description>&lt;P&gt;Sample Data :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;objectA&lt;/STRONG&gt;":{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"attempts":[&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626330378365,&lt;BR /&gt;"responseTime":1626330378622,&lt;BR /&gt;"status":"SUCCESS"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"&lt;STRONG&gt;objectB&lt;/STRONG&gt;":{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"attempts":[&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626329472707,&lt;BR /&gt;"responseTime":1626329474713,&lt;BR /&gt;"status":"FAILURE"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"&lt;STRONG&gt;objectC&lt;/STRONG&gt;":{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"attempts":[&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626329472707,&lt;BR /&gt;"responseTime":1626329474713,&lt;BR /&gt;"status":"FAILURE"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626330378365,&lt;BR /&gt;"responseTime":1626330378622,&lt;BR /&gt;"status":"SUCCESS"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"&lt;STRONG&gt;objectD&lt;/STRONG&gt;":{&lt;BR /&gt;"aggrStatus":"SUCCESS",&lt;BR /&gt;"attempts":[&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626329472707,&lt;BR /&gt;"responseTime":1626329474713,&lt;BR /&gt;"status":"FAILURE"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"aggrStatus":"FAILURE",&lt;BR /&gt;"responses":[&lt;BR /&gt;{&lt;BR /&gt;"requestTime":1626329472707,&lt;BR /&gt;"responseTime":1626329474713,&lt;BR /&gt;"status":"FAILURE"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;},&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Let's assume Object A to D are results of search. and in my case, Only Object A and C should be considered for calculation as they are success and object B and D are failure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jul 2021 07:43:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559544#M158962</guid>
      <dc:creator>splunkDevendra</dc:creator>
      <dc:date>2021-07-15T07:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to find out average response time for all events by looking at two fields in same event msg ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559556#M158969</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "(?s)\"object\w\":(?&amp;lt;object&amp;gt;.*)"
| spath input=object path=attempts{} output=attempts
| mvexpand attempts
| spath input=attempts path=responses{} output=responses
| spath input=responses
| where status="SUCCESS"
| eval response=floor((responseTime-requestTime)/1000)
| stats count by response&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Jul 2021 08:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-find-out-average-response-time-for-all-events-by-looking/m-p/559556#M158969</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-15T08:24:12Z</dc:date>
    </item>
  </channel>
</rss>

