<?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 transaction and conditional logic in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38291#M8693</link>
    <description>&lt;P&gt;I am working on a variation on a transaction query as described here: &lt;A href="http://answers.splunk.com/questions/5619/calculating-the-duration-of-a-transaction-fragment-vs-the-total-transaction" rel="nofollow"&gt;http://answers.splunk.com/questions/5619/calculating-the-duration-of-a-transaction-fragment-vs-the-total-transaction&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(... search )
| eval phase1_time=if(searchmatch("Entering"), _time, null())
| eval phase2_time=if(searchmatch("Exiting"), _time, null())
| transaction fields="sessionId" startswith="Entering" endswith="Exiting"
| eval phase1_duration=phase2_time-phase1_time
| search phase1_duration &amp;gt;= 10
| fields host,loginId,sessionId,phase1_duration,source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works for my reporting purposes but I would like an operational version of this query that would be capable of providing results of sessionId's which have started/Entered but have not Exited yet - within a window of seconds similar to what I am doing with phase1_duration.&lt;/P&gt;

&lt;P&gt;Anyone have ideas?&lt;/P&gt;</description>
    <pubDate>Fri, 27 Aug 2010 03:49:18 GMT</pubDate>
    <dc:creator>bilsch</dc:creator>
    <dc:date>2010-08-27T03:49:18Z</dc:date>
    <item>
      <title>transaction and conditional logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38291#M8693</link>
      <description>&lt;P&gt;I am working on a variation on a transaction query as described here: &lt;A href="http://answers.splunk.com/questions/5619/calculating-the-duration-of-a-transaction-fragment-vs-the-total-transaction" rel="nofollow"&gt;http://answers.splunk.com/questions/5619/calculating-the-duration-of-a-transaction-fragment-vs-the-total-transaction&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(... search )
| eval phase1_time=if(searchmatch("Entering"), _time, null())
| eval phase2_time=if(searchmatch("Exiting"), _time, null())
| transaction fields="sessionId" startswith="Entering" endswith="Exiting"
| eval phase1_duration=phase2_time-phase1_time
| search phase1_duration &amp;gt;= 10
| fields host,loginId,sessionId,phase1_duration,source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works for my reporting purposes but I would like an operational version of this query that would be capable of providing results of sessionId's which have started/Entered but have not Exited yet - within a window of seconds similar to what I am doing with phase1_duration.&lt;/P&gt;

&lt;P&gt;Anyone have ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2010 03:49:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38291#M8693</guid>
      <dc:creator>bilsch</dc:creator>
      <dc:date>2010-08-27T03:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: transaction and conditional logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38292#M8694</link>
      <description>&lt;P&gt;I'm wondering why you don't just use the "duration" field that is automatically computed by the "transaction" command, that is simply the difference between _time of the first and _time of the last event in the transaction.&lt;/P&gt;

&lt;P&gt;If that field value works for you, you can simply add "keepevicted=true" to your transaction options, and incomplete transactions will be kept in your results, but the duration will be calculated according to the last event anyway.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2010 06:14:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38292#M8694</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-08-27T06:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: transaction and conditional logic</title>
      <link>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38293#M8695</link>
      <description>&lt;P&gt;Good point on the duration vs eval to derive. This does simplify the original query - thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2010 18:19:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/transaction-and-conditional-logic/m-p/38293#M8695</guid>
      <dc:creator>bilsch</dc:creator>
      <dc:date>2010-08-27T18:19:37Z</dc:date>
    </item>
  </channel>
</rss>

