<?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 get incomplete transactions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164847#M46816</link>
    <description>&lt;P&gt;yes you can.&lt;/P&gt;</description>
    <pubDate>Sat, 25 Apr 2015 08:49:17 GMT</pubDate>
    <dc:creator>fdi01</dc:creator>
    <dc:date>2015-04-25T08:49:17Z</dc:date>
    <item>
      <title>how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164839#M46808</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need small help from you, I am calculating duration of each transaction of on userid.&lt;/P&gt;

&lt;P&gt;My query:&lt;/P&gt;

&lt;P&gt;index=A  sourcetype=B host=ABC | rex field=_raw "-R(?.*)-I" | rex field=_raw "status&lt;A href="https://community.splunk.com/?.*" target="_blank"&gt;\s&lt;/A&gt;" |transaction DID maxevents=10000 startswith="Beginning session" endswith="Ending session" | convert ctime(_time) as time |eval endtime= _time+duration |convert ctime(endtime) as Endtime| eval hour=strftime(_time, "%H")|eval status=if(result="0","Success", "Error") | table DID time Endtime duration Project host result status hour &lt;/P&gt;

&lt;P&gt;the above query is giving correct results only, but there is some transactions which is not having 'Ending session', for some transaction there is no 'Beginning and ending  session'. I know that where the beginning and end session are not there were incomplete transactions and their status is error. but I am not getting those DIDs in my output, I am getting only where Beginning and ending session DIDs. &lt;/P&gt;

&lt;P&gt;Pl help me to do this&lt;/P&gt;

&lt;P&gt;here is some sample logs which not having beginning and ending sessions &lt;/P&gt;

&lt;P&gt;Logs:&lt;BR /&gt;
 1. &lt;STRONG&gt;No Ending session but having 3-4 log lines&lt;/STRONG&gt;&lt;BR /&gt;
117,20150418 05:09:42.860,155,32,MIV,1615241 - 0xc64,-P -R6801ddbc-1528-472f-805a-d9645c4ffa0c -I351 Beginning session&lt;BR /&gt;
208,20150418 05:10:18.111,155,32,MIV,1615241 - 0xc64,-PC2BBD -R6801ddbc-1528-472f-805a-d9645c4ffa0c -I351 Processed package bc7f579a-6a59-495f-b23e-059ea49e963c from client 6801ddbc-1528-472f-805a-d9645c4ffa0c&lt;BR /&gt;
208,20150418 05:12:21.193,155,32,MIV,1615241 - 0xc64,-PCX2J6 -R6801ddbc-1528-472f-805a-d9645c4ffa0c -I351 Processed package deca35af-62f4-4db4-8fa5-ff01784f085d from client 6801ddbc-1528-472f-805a-d9645c4ffa0c &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;No ending session with one log line&lt;/STRONG&gt;&lt;BR /&gt;
118,20150418 09:52:10.058,155,32,MIV,1634745 - 0x1aac,-P -Rbde65047-6274-4fbf-98bd-b8593b014dd9 -I152 Beginning session&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;For some dids there is no beginning session and endining session as per logs its starting with ‘session does not exist’&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;277,20150414 14:15:56.227,155,4,MIV,1333626 - 0x13a4,-P -R -I Session does not exist for 2dd0b5a3-bcbe-428f-b8b0-23aefc96e0a4&lt;BR /&gt;
268,20150414 14:08:53.198,155,4,MIV,1333626 - 0x13a4,-P -R -I Session does not exist for 9edb5b57-85f1-47c6-a3e3-62ebf5767990&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:40:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164839#M46808</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2020-09-28T19:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164840#M46809</link>
      <description>&lt;P&gt;I think you would like to keep include events that dont match the transaction command. You can add the 'keepevicted=true' flag to your transaction command in search. Then all of your events will have a 'closed_txn' field which is boolean 0 or 1 depending if the transaction is complete or not. From there you can look at non-closed transaction events and decide what to do..&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 04:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164840#M46809</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2015-04-24T04:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164841#M46810</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for your immediate response,&lt;/P&gt;

&lt;P&gt;I tried keepevicted and close_txn but i didnt get the results what i expected. May be I am using these 2 commands in wrong place, If you dont mind can you please tell me where I can use these 2 commands with a small example&lt;/P&gt;

&lt;P&gt;thank you so much&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 05:13:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164841#M46810</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-04-24T05:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164842#M46811</link>
      <description>&lt;P&gt;Refer to the docs for syntax : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;... | transaction keepevicted=true ....&lt;/P&gt;

&lt;P&gt;After that, you will have a new field called closed_txn. Filter your results based on the values of that field and see how your results look. &lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 05:19:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164842#M46811</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2015-04-24T05:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164843#M46812</link>
      <description>&lt;P&gt;Thank  you so much, I will try this and let you know &lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 05:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164843#M46812</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-04-24T05:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164844#M46813</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I tried keepevicted =true but no luck. Pl suggest me is there any other way to do this&lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 13:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164844#M46813</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-04-24T13:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164845#M46814</link>
      <description>&lt;P&gt;for :&lt;BR /&gt;
&lt;STRONG&gt;No Ending session but having 3-4 log lines&lt;/STRONG&gt;  try like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   ...|transaction DID maxevents=10000 startswith="Beginning session"  |... 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;For some dids there is no beginning session and endining session as per logs its starting with ‘session does not exist’&lt;/STRONG&gt;&lt;BR /&gt;
try  like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...|transaction  "Session does not exist" maxevents=10000|...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;P&gt;you can use this transaction option &lt;CODE&gt;keeporphans=true&lt;/CODE&gt;&lt;BR /&gt;
because  it Specify whether the transaction command should output the results that are not part of any transactions. The results that are passed through as "orphans" are distinguished from transaction events with a _txn_orphan field, which has a value of 1 for orphan results. Defaults to false.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:40:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164845#M46814</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2020-09-28T19:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164846#M46815</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thank you for your response,&lt;/P&gt;

&lt;P&gt;It means you want me to use two transactions in one search&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 14:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164846#M46815</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-04-24T14:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164847#M46816</link>
      <description>&lt;P&gt;yes you can.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Apr 2015 08:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164847#M46816</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-04-25T08:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to get incomplete transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164848#M46817</link>
      <description>&lt;P&gt;as per your suggestion i have taken two transactions but its giving error.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2015 13:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-incomplete-transactions/m-p/164848#M46817</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2015-04-27T13:26:59Z</dc:date>
    </item>
  </channel>
</rss>

