<?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 do you determine the time difference between two events? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416051#M119772</link>
    <description>&lt;P&gt;Ah I see. He mentioned using the transaction command and finding the difference. Garbage questions get garbage answers &lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2019 15:33:15 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2019-01-22T15:33:15Z</dc:date>
    <item>
      <title>How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416045#M119766</link>
      <description>&lt;P&gt;So I've read several previous questions on how to get the time difference between events, and they all seem to revolve around the transaction command.  But that seems to then group my events and I don't want that.  &lt;/P&gt;

&lt;P&gt;My search gives me exactly what I want, but I'd simply like to determine the time difference between two events.  I'm sure it's simple but I've spent too much time, so now, it is time to ask the community.  &lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Rob&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 17:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416045#M119766</guid>
      <dc:creator>muzicman61</dc:creator>
      <dc:date>2019-01-21T17:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416046#M119767</link>
      <description>&lt;P&gt;You should post your query which would make it easier for us to help you. Try adding an &lt;CODE&gt;eval&lt;/CODE&gt; like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval New_field_name=time_end - time_start
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace &lt;CODE&gt;New_field_name&lt;/CODE&gt; with your new field name. And replace &lt;CODE&gt;time_end&lt;/CODE&gt; and &lt;CODE&gt;time_start&lt;/CODE&gt; with your field names&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2019 18:06:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416046#M119767</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2019-01-21T18:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416047#M119768</link>
      <description>&lt;P&gt;Thanks... Here is my query:&lt;/P&gt;

&lt;P&gt;sourcetype="QMGR:manager" source="/opt/web/tomcat_instances/logs/tomcat_1/sessionmanager.sm.log.*"  action ("540262" OR "15771078996")&lt;/P&gt;

&lt;P&gt;But I'm not sure what field names I would substitute in your example.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:51:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416047#M119768</guid>
      <dc:creator>muzicman61</dc:creator>
      <dc:date>2020-09-29T22:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416048#M119769</link>
      <description>&lt;P&gt;You need to list the two fields that represent the start time and end time.. &lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 14:33:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416048#M119769</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2019-01-22T14:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416049#M119770</link>
      <description>&lt;P&gt;I think he is asking for time difference between 2 separate events, not the difference between 2 time fields in 1 event.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 15:28:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416049#M119770</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-01-22T15:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416050#M119771</link>
      <description>&lt;P&gt;Should be possible to do that with the &lt;CODE&gt;| streamstats&lt;/CODE&gt; command. &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Streamstats"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Streamstats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In its simplest form, it would look something like this (to add a field in each event with the difference between the _time value of that event and the previous event):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your current search...
| streamstats window=2 range(_time) as timediff
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or alternatively, using the &lt;CODE&gt;| delta&lt;/CODE&gt; command. &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Delta"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Delta&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your current search...
| delta _time as timediff
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Jan 2019 15:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416050#M119771</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-01-22T15:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416051#M119772</link>
      <description>&lt;P&gt;Ah I see. He mentioned using the transaction command and finding the difference. Garbage questions get garbage answers &lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 15:33:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416051#M119772</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2019-01-22T15:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416052#M119773</link>
      <description>&lt;P&gt;Sorry you think my question was garbage.  I'm new to Splunk and trying my best to learn.  If you read my first post I mention that OTHER posts mention the transaction command but that was not what I wanted as it grouped my transactions.  Maybe some people just need to learn how to read.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 16:01:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416052#M119773</guid>
      <dc:creator>muzicman61</dc:creator>
      <dc:date>2019-01-22T16:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416053#M119774</link>
      <description>&lt;P&gt;Thanks Frank. The delta command did exactly what I needed.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 16:04:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416053#M119774</guid>
      <dc:creator>muzicman61</dc:creator>
      <dc:date>2019-01-22T16:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you determine the time difference between two events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416054#M119775</link>
      <description>&lt;P&gt;You're question was vague with little details. If you want help on here, I'd strongly recommend you try not insulting users and add some effort into your questions.. &lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 16:09:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-determine-the-time-difference-between-two-events/m-p/416054#M119775</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2019-01-22T16:09:10Z</dc:date>
    </item>
  </channel>
</rss>

