<?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: how to calculate time difference between multiple events based on ID in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/525109#M148145</link>
    <description>&lt;P&gt;I prepared the below as you suggested, it is working fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;index=tibco_44_bw6_dev | rex field=_raw "jobId: (?&amp;lt;jId&amp;gt;\w+);" | stats earliest(_time) as start latest(_time) as end by jId&amp;nbsp;| eval diff=end-start |where diff &amp;gt;1000&lt;/P&gt;&lt;P&gt;I got the below results and difference is 3619, how can convert it to minutes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11341i57159AE7FF4625D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;image.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2020 17:53:48 GMT</pubDate>
    <dc:creator>rkishoreqa</dc:creator>
    <dc:date>2020-10-16T17:53:48Z</dc:date>
    <item>
      <title>how to calculate time difference between multiple events based on ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/524942#M148085</link>
      <description>&lt;P&gt;I have one requirement to calculate the time difference between multiple events based on JobId.&amp;nbsp; The logs are like below.&amp;nbsp; From the below logs I need to fetch time stamps for each jobId which having multiple events.&lt;BR /&gt;And calculate the difference between the timestamps and assign to the jobId like :&amp;nbsp;bw0a10db49 - (2 mins)&lt;/P&gt;&lt;P&gt;2020-10-14 12:41:40.468 INFO [Process Worker-9]Log - 2020-10-14T12:41:40.468-04:00 - INFO - jobId: bw0a10db49;&lt;BR /&gt;Msg: Application testing.application started&lt;BR /&gt;2020-10-14 12:41:41.362 INFO [Process Worker-9]Log - 2020-10-14T12:41:40.468-04:00 - INFO - jobId: bw0a10db49;&lt;BR /&gt;Msg: Application testing.application started&lt;BR /&gt;2020-10-14 12:41:42.480 INFO [Process Worker-6]Log - 2020-10-14T12:41:42.48-04:00 - INFO - jobId: bw0a10db49;&lt;BR /&gt;Msg: EndOfFile Submited to ConcurentWebservice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest me with the query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 20:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/524942#M148085</guid>
      <dc:creator>rkishoreqa</dc:creator>
      <dc:date>2020-10-15T20:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate time difference between multiple events based on ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/524949#M148087</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats earliest(_time) as start latest(_time) as end by jobid
| eval diff=end-start&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 Oct 2020 20:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/524949#M148087</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-15T20:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate time difference between multiple events based on ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/525109#M148145</link>
      <description>&lt;P&gt;I prepared the below as you suggested, it is working fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;nbsp;index=tibco_44_bw6_dev | rex field=_raw "jobId: (?&amp;lt;jId&amp;gt;\w+);" | stats earliest(_time) as start latest(_time) as end by jId&amp;nbsp;| eval diff=end-start |where diff &amp;gt;1000&lt;/P&gt;&lt;P&gt;I got the below results and difference is 3619, how can convert it to minutes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11341i57159AE7FF4625D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;image.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 17:53:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/525109#M148145</guid>
      <dc:creator>rkishoreqa</dc:creator>
      <dc:date>2020-10-16T17:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to calculate time difference between multiple events based on ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/525177#M148165</link>
      <description>&lt;LI-CODE lang="markup"&gt;| fieldformat diff=tostring(diff,"duration")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 17 Oct 2020 08:15:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-calculate-time-difference-between-multiple-events-based/m-p/525177#M148165</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-17T08:15:46Z</dc:date>
    </item>
  </channel>
</rss>

