<?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: Response Time Calculation between 2 different events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358712#M106024</link>
    <description>&lt;P&gt;index=myindex1 &lt;BR /&gt;
eventName=5000 ---&amp;gt;have b(starting time and ending time ) and reference id &lt;BR /&gt;
eventName=5001 ---&amp;gt;have (starting time and ending time ) and reference id&lt;/P&gt;

&lt;P&gt;here my condition if both event names - reference id are same then,&lt;BR /&gt;
event 5000 stating time and event 5001 ending time and total duration of time and average time I need to show in dashboards &lt;BR /&gt;
can you please provide query &lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 04:41:17 GMT</pubDate>
    <dc:creator>vkari</dc:creator>
    <dc:date>2019-01-28T04:41:17Z</dc:date>
    <item>
      <title>Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358706#M106018</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to find response time between events in different sourcetype but not able to figure out how to find time difference. For some it is coming correctly but for some value is coming negative , look like end time value is not coming correctly. Below is the search I am using. I need to find value based on common conversation ID and find avg by action. I tried with transaction but with conversation id is not having same value for all the events and transaction is not working.&lt;/P&gt;

&lt;P&gt;index=A sourcetype="A_log4j" "Input Validation Passed" | rex "CONV_ID\s:\s(?.+)" | stats values(_time) as start by conversation_id | appendcols [search index=A sourcetype="B_log4j" "Outbound payload received" | rex "convId:\s(?[^/,]+)" | rex "action:\s(?[^/,]+)" | stats values(_time) as end by conversation_id,action] | eval diff=tonumber(start-end)| table conversation_id start action end diff.&lt;/P&gt;

&lt;P&gt;For some : getting wrong value for subsearch and hence diff time is coming incorrectly. Please advise how I can find response time in this scenario.&lt;/P&gt;

&lt;P&gt;Thanks much!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:17:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358706#M106018</guid>
      <dc:creator>hemendralodhi</dc:creator>
      <dc:date>2020-09-29T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358707#M106019</link>
      <description>&lt;P&gt;Also in both the source time format is different for first search it is like this : 06-Aug-2017 17:00:31,381, for subsearch data it is 2017-08-06 17:00:31&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 11:47:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358707#M106019</guid>
      <dc:creator>hemendralodhi</dc:creator>
      <dc:date>2017-08-08T11:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358708#M106020</link>
      <description>&lt;P&gt;instead of &lt;CODE&gt;values(_time)&lt;/CODE&gt; try &lt;CODE&gt;earliest&lt;/CODE&gt; or &lt;CODE&gt;min&lt;/CODE&gt; in both the base search and the subsearch. &lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 11:48:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358708#M106020</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-08-08T11:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358709#M106021</link>
      <description>&lt;P&gt;still getting the same results. &lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 13:10:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358709#M106021</guid>
      <dc:creator>hemendralodhi</dc:creator>
      <dc:date>2017-08-08T13:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358710#M106022</link>
      <description>&lt;P&gt;when you run the subsearch on its own, are you getting the correct time? grab one conversation_id and action that looked wrong and check the events and then add the stats command. does that match the indexed _time? &lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 13:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358710#M106022</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-08-08T13:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358711#M106023</link>
      <description>&lt;P&gt;If you need &lt;CODE&gt;| stats abs(max(_time) - min(_time))&lt;/CODE&gt; then just use &lt;CODE&gt;| stats range(_time)&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 14:27:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358711#M106023</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-08T14:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Response Time Calculation between 2 different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358712#M106024</link>
      <description>&lt;P&gt;index=myindex1 &lt;BR /&gt;
eventName=5000 ---&amp;gt;have b(starting time and ending time ) and reference id &lt;BR /&gt;
eventName=5001 ---&amp;gt;have (starting time and ending time ) and reference id&lt;/P&gt;

&lt;P&gt;here my condition if both event names - reference id are same then,&lt;BR /&gt;
event 5000 stating time and event 5001 ending time and total duration of time and average time I need to show in dashboards &lt;BR /&gt;
can you please provide query &lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 04:41:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Response-Time-Calculation-between-2-different-events/m-p/358712#M106024</guid>
      <dc:creator>vkari</dc:creator>
      <dc:date>2019-01-28T04:41:17Z</dc:date>
    </item>
  </channel>
</rss>

