<?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 do I find the time difference between these events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257810#M77212</link>
    <description>&lt;P&gt;We have the events like below (fields like flowId, action..etc) and need a final output between the events (action = FLOW_END_SUCCESS and FLOW_START) time difference based on flowId,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-05-18 21:33:10,208 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=FLOW_END_SUCCESS, mpxId=116310, accountId=46862
2016-05-18 21:33:10,208 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=SAVE_ITEM_TO_DB_END, mpxId=116310, accountId=46862
2016-05-18 21:33:10,207 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=SAVE_ITEM_TO_DB_START, mpxId=116310, accountId=46862
2016-05-18 21:33:10,206 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=FLOW_START, mpxId=116310, accountId=46862
2016-05-18 21:33:05,269 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607185173, flow=INTAKE, type=player, action=FLOW_END_SUCCESS, mpxId=116310, accountId=46857
2016-05-18 21:33:05,269 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607185173, flow=INTAKE, type=player, action=SEND_ITEM_TO_QUEUE_END_SUCCESS, mpxId=116310, accountId=46857
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Final output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;flowId,    time_difference_in_ms
1463607185173,   1234
1463607190206,   5678
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:44:33 GMT</pubDate>
    <dc:creator>dhavamanis</dc:creator>
    <dc:date>2020-09-29T09:44:33Z</dc:date>
    <item>
      <title>How do I find the time difference between these events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257810#M77212</link>
      <description>&lt;P&gt;We have the events like below (fields like flowId, action..etc) and need a final output between the events (action = FLOW_END_SUCCESS and FLOW_START) time difference based on flowId,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-05-18 21:33:10,208 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=FLOW_END_SUCCESS, mpxId=116310, accountId=46862
2016-05-18 21:33:10,208 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=SAVE_ITEM_TO_DB_END, mpxId=116310, accountId=46862
2016-05-18 21:33:10,207 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=SAVE_ITEM_TO_DB_START, mpxId=116310, accountId=46862
2016-05-18 21:33:10,206 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607190206, flow=INTAKE, type=player, action=FLOW_START, mpxId=116310, accountId=46862
2016-05-18 21:33:05,269 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607185173, flow=INTAKE, type=player, action=FLOW_END_SUCCESS, mpxId=116310, accountId=46857
2016-05-18 21:33:05,269 INFO [pool-3-thread-1] c.n.m.l.EventLogger [EventLogger.java:18] env=DEV, flowId=1463607185173, flow=INTAKE, type=player, action=SEND_ITEM_TO_QUEUE_END_SUCCESS, mpxId=116310, accountId=46857
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Final output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;flowId,    time_difference_in_ms
1463607185173,   1234
1463607190206,   5678
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257810#M77212</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2020-09-29T09:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find the time difference between these events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257811#M77213</link>
      <description>&lt;P&gt;See if this gives you what you're looking for&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats values(eval(if(action="FLOW_START", _time, null()))) AS start values(eval(if(action="FLOW_END_SUCCESS", _time, null()))) AS end by flowId | eval dur=tostring(end-start, "duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 May 2016 21:52:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257811#M77213</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-05-18T21:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I find the time difference between these events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257812#M77214</link>
      <description>&lt;P&gt;Can you provide the query to get the duration in milliseconds . currently its showing like "00:00:00.094"&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2016 13:45:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-find-the-time-difference-between-these-events/m-p/257812#M77214</guid>
      <dc:creator>dhavamanis</dc:creator>
      <dc:date>2016-05-19T13:45:58Z</dc:date>
    </item>
  </channel>
</rss>

