<?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 Need to Calculate Response Time matching Index ID between 2 lines in the search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453109#M171286</link>
    <description>&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/272686-splunk.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;If look the below screen shot due to multiple calls in same time some time response takes a while and we need to match the ID and calculate difference &lt;BR /&gt;
right now i am using the below query this works well if we have request and response comes next to each other &lt;/P&gt;

&lt;P&gt;index=e1prd host=pite1bspd1 sourcetype=e1_npd_bssv &lt;EM&gt;PublishedMethod&lt;/EM&gt; | transaction transid startswith="startPublishedMethod" endswith="finishPublishedMethod" | rename duration as Response_Time |table Instance_ID,Response_Time&lt;/P&gt;

&lt;P&gt;Please advise &lt;BR /&gt;
Thanks,&lt;BR /&gt;
Santhosh&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:29:15 GMT</pubDate>
    <dc:creator>lsanthoshbe</dc:creator>
    <dc:date>2020-09-30T00:29:15Z</dc:date>
    <item>
      <title>Need to Calculate Response Time matching Index ID between 2 lines in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453109#M171286</link>
      <description>&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/272686-splunk.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;If look the below screen shot due to multiple calls in same time some time response takes a while and we need to match the ID and calculate difference &lt;BR /&gt;
right now i am using the below query this works well if we have request and response comes next to each other &lt;/P&gt;

&lt;P&gt;index=e1prd host=pite1bspd1 sourcetype=e1_npd_bssv &lt;EM&gt;PublishedMethod&lt;/EM&gt; | transaction transid startswith="startPublishedMethod" endswith="finishPublishedMethod" | rename duration as Response_Time |table Instance_ID,Response_Time&lt;/P&gt;

&lt;P&gt;Please advise &lt;BR /&gt;
Thanks,&lt;BR /&gt;
Santhosh&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:29:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453109#M171286</guid>
      <dc:creator>lsanthoshbe</dc:creator>
      <dc:date>2020-09-30T00:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Calculate Response Time matching Index ID between 2 lines in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453110#M171287</link>
      <description>&lt;P&gt;you can first try to convert your time to epoch using &lt;CODE&gt;strptime&lt;/CODE&gt; and then use &lt;CODE&gt;streamstats&lt;/CODE&gt; to group together both the events with the same id and then calculate the difference. &lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 00:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453110#M171287</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2019-05-11T00:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Calculate Response Time matching Index ID between 2 lines in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453111#M171288</link>
      <description>&lt;P&gt;if you can provide exact query / sample that would be great !!&lt;BR /&gt;
Thanks for your help&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2019 00:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453111#M171288</guid>
      <dc:creator>lsanthoshbe</dc:creator>
      <dc:date>2019-05-11T00:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Calculate Response Time matching Index ID between 2 lines in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453112#M171289</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=e1prd host=pite1bspd1 sourcetype=e1_npd_bssv *PublishedMethod*
| streamstats count(eval(searchmatch("finishPublishedMethod"))) AS sessionID BY instance_ID transid
| stats range(_time) AS Response_Time BY sessionID instance_ID transid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 May 2019 05:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453112#M171289</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-05-11T05:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need to Calculate Response Time matching Index ID between 2 lines in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453113#M171290</link>
      <description>&lt;P&gt;Excellent Gregg!! Thanks for you support !!  i used this below query and looks like working now &lt;BR /&gt;
i really appreciate your support &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=e1stg host=pite1bsqa2  *PublishedMethod*
| streamstats count(eval(searchmatch("finishPublishedMethod"))) AS sessionID BY Instance_ID_QA
| stats range(_time) AS Response_Time BY sessionID Instance_ID_QA
| table Instance_ID_QA,Response_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 May 2019 14:05:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-Calculate-Response-Time-matching-Index-ID-between-2/m-p/453113#M171290</guid>
      <dc:creator>lsanthoshbe</dc:creator>
      <dc:date>2019-05-11T14:05:46Z</dc:date>
    </item>
  </channel>
</rss>

