<?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: Find Transactions that overlap a certain timestamp in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177983#M35686</link>
    <description>&lt;P&gt;All of your transactions will have a &lt;CODE&gt;_time&lt;/CODE&gt; field representing the first event in the transaction, as well as a &lt;CODE&gt;duration&lt;/CODE&gt; field telling you the difference in seconds between the first event in the transaction and the last event. Based on this, you can pass in the time you want and see whether it fits within that information.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...transaction-generating-search...
| convert num(_time) as startetime
| eval endetime=startetime+duration
| eval mytime="2015-01-07 12:34:56"
| convert timeformat="%Y-%m-%d %H:%M:%S" mktime(mytime) as myetime
| where myetime&amp;gt;=startetime and myetime&amp;lt;=endetime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this is helpful.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jan 2015 15:03:07 GMT</pubDate>
    <dc:creator>aweitzman</dc:creator>
    <dc:date>2015-01-07T15:03:07Z</dc:date>
    <item>
      <title>Find Transactions that overlap a certain timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177982#M35685</link>
      <description>&lt;P&gt;I've been able to use the transaction command to group logins and logouts of users. What's the best way to find the transactions that occur overlap a certain timestamp? For example if I have a transaction that starts at 10 and ends at 11:00 I would want them to show up when searching 10:30.&lt;/P&gt;

&lt;P&gt;I've been able to split the transaction up into two rows with data of the following form:&lt;BR /&gt;
_time.........................................user....Login....Logout&lt;BR /&gt;
12/29/14 10:00:00.000 AM..........A.........1............0......&lt;BR /&gt;
12/29/14 11:00:00.000 AM..........A.........0............1......&lt;/P&gt;

&lt;P&gt;and I think this form may be slightly easier to work with, but I can't think of how to grab all users that logged in before 10:30 and logged out after 10:30.&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:29:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177982#M35685</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2015-01-07T14:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Find Transactions that overlap a certain timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177983#M35686</link>
      <description>&lt;P&gt;All of your transactions will have a &lt;CODE&gt;_time&lt;/CODE&gt; field representing the first event in the transaction, as well as a &lt;CODE&gt;duration&lt;/CODE&gt; field telling you the difference in seconds between the first event in the transaction and the last event. Based on this, you can pass in the time you want and see whether it fits within that information.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...transaction-generating-search...
| convert num(_time) as startetime
| eval endetime=startetime+duration
| eval mytime="2015-01-07 12:34:56"
| convert timeformat="%Y-%m-%d %H:%M:%S" mktime(mytime) as myetime
| where myetime&amp;gt;=startetime and myetime&amp;lt;=endetime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this is helpful.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 15:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177983#M35686</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2015-01-07T15:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Find Transactions that overlap a certain timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177984#M35687</link>
      <description>&lt;P&gt;Thanks! I ended up using  &lt;CODE&gt;| eval startetime=_time&lt;/CODE&gt; instead of &lt;CODE&gt;| convert num(_time) as startetime&lt;/CODE&gt; but it worked for me!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:05:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Find-Transactions-that-overlap-a-certain-timestamp/m-p/177984#M35687</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2015-01-07T16:05:05Z</dc:date>
    </item>
  </channel>
</rss>

