<?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 search the time difference between start and end events for each unique event ID? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160319#M32502</link>
    <description>&lt;P&gt;Like this (assuming you are already extracting Unique ID as &lt;CODE&gt;UniqueID&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats earliest(_time) AS startTime latest(_time) AS endTime by UniqueID | eval DurationSeconds=(endTime - startTime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Jun 2015 22:51:06 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-06-17T22:51:06Z</dc:date>
    <item>
      <title>How to search the time difference between start and end events for each unique event ID?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160318#M32501</link>
      <description>&lt;P&gt;I have a log file going to Splunk which indicates the start and end of an event for VM creation.  For example, in the logs I see something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;6/15/2015 11:00:00 &amp;lt;unique ID 1&amp;gt; Start event
... other events...
6/15/2015 11:02:00 &amp;lt;unique ID 1&amp;gt; End event
... other events...
6/15/2015 11:04:00 &amp;lt;unique ID 2&amp;gt; Start event
... other events...
6/15/2015 11:05:00 &amp;lt;unique ID 2&amp;gt; End event
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to be able to get the time difference between the start and end event for all unique events as given by "unique id X".&lt;/P&gt;

&lt;P&gt;Another way of saying it is, for all unique ID's, do eval(endtimestamp - starttimestamp), and print out the time difference in table form.  I'm struggling to figure out how to do this through Splunk though.  Can anyone point me in the right direction?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 22:45:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160318#M32501</guid>
      <dc:creator>kflavin</dc:creator>
      <dc:date>2015-06-17T22:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the time difference between start and end events for each unique event ID?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160319#M32502</link>
      <description>&lt;P&gt;Like this (assuming you are already extracting Unique ID as &lt;CODE&gt;UniqueID&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats earliest(_time) AS startTime latest(_time) AS endTime by UniqueID | eval DurationSeconds=(endTime - startTime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jun 2015 22:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160319#M32502</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-17T22:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the time difference between start and end events for each unique event ID?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160320#M32503</link>
      <description>&lt;P&gt;Thanks.  I'm still trying to get the uniqueid extracted as a field, then I'll give it a try.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 23:33:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160320#M32503</guid>
      <dc:creator>kflavin</dc:creator>
      <dc:date>2015-06-17T23:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the time difference between start and end events for each unique event ID?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160321#M32504</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "^\d+/\d+/\d+\s+\d+:\d+:\d+\s+(?&amp;lt;UniqueID&amp;gt;\S+)" | stats earliest(_time) AS startTime latest(_time) AS endTime by UniqueID | eval DurationSeconds=(endTime - startTime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jun 2015 23:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160321#M32504</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-17T23:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to search the time difference between start and end events for each unique event ID?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160322#M32505</link>
      <description>&lt;P&gt;Working!   Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2015 03:28:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-the-time-difference-between-start-and-end-events/m-p/160322#M32505</guid>
      <dc:creator>kflavin</dc:creator>
      <dc:date>2015-06-18T03:28:47Z</dc:date>
    </item>
  </channel>
</rss>

