<?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: Append or join transactions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267688#M80522</link>
    <description>&lt;P&gt;What all fields you're using in your final output? (or planning to use)&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2016 01:58:54 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-07-21T01:58:54Z</dc:date>
    <item>
      <title>Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267687#M80521</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have two different transactions. individually it works perfect but can some one help me to append the two transactions because&lt;BR /&gt;
the thread ,startwith and endswith everything is different for both the transactions.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="i" sourcetype="s"  | rex "(?jmsListener\w-\d+)"  | transaction thread startswith="LoggingMessageConverter | request:" endswith="LoggingMessageConverter | response:"   | eval ms= duration*1000  

index="i" sourcetype="s"  | rex "(?http-\w+\.\w+\.\w+\.\w+/\d+\.\d+\.\d+\.\d+:\d+-\d+)" | transaction thread startswith="WebService Request: \&amp;lt;?xml" endswith="WebService Response: \&amp;lt;?xml" | eval ms= duration*1000 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried to play around with transaction, I think field cann't be assigned to satrtswith/endswith&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "(?&amp;lt;thread&amp;gt;http-\w+\.\w+\.\w+\.\w+/\d+\.\d+\.\d+\.\d+:\d+-\d+|jmsListener\w-\d+)" | 
rex "(?&amp;lt;transtarted&amp;gt;LoggingMessageConverter\s\|\srequest:|WebService\sRequest:\s\&amp;lt;\?xml)"|
rex "(?&amp;lt;tranended&amp;gt;LoggingMessageConverter\s\|\sresponse:|WebService\sResponse:\s\&amp;lt;\?xml)" |
transaction thread startswith=transtarted endswith=tranended
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jul 2016 01:45:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267687#M80521</guid>
      <dc:creator>saradachelluboy</dc:creator>
      <dc:date>2016-07-21T01:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267688#M80522</link>
      <description>&lt;P&gt;What all fields you're using in your final output? (or planning to use)&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 01:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267688#M80522</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-21T01:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267689#M80523</link>
      <description>&lt;P&gt;I created thread,transtarted,&amp;amp; tranended using rex but these are not real fields created by splunk.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 02:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267689#M80523</guid>
      <dc:creator>saradachelluboy</dc:creator>
      <dc:date>2016-07-21T02:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267690#M80524</link>
      <description>&lt;P&gt;No, I'm thinking a way to eliminate transaction command itself, but that will require the fields that you want to use in your final expected output. Do you just need _time thread and duration OR any other fields?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 02:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267690#M80524</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-21T02:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267691#M80525</link>
      <description>&lt;P&gt;I agree with @somesoni2 - if we knew more, you could perhaps avoid using the transaction command altogether.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 02:55:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267691#M80525</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-07-21T02:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267692#M80526</link>
      <description>&lt;P&gt;I understand that you want to combine these, but there are two problems with your initial solution:&lt;BR /&gt;
1 - You have a syntax problem; &lt;CODE&gt;transaction thread startswith=transtarted endswith=tranended&lt;/CODE&gt;&lt;BR /&gt;
should be &lt;CODE&gt;transaction thread startswith=eval(isnotnull(transtarted)) endswith=eval(isnotnull(tranended))&lt;/CODE&gt;&lt;BR /&gt;
2 - Even with the syntax fixed, it still won't work. You could end up with a transaction that begins with a logging message and ends with a web service response. I don't think that is what you want.&lt;/P&gt;

&lt;P&gt;Try this - it isn't very efficient, but it should work, at least for smaller datasets:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="i" sourcetype="s"  
| rex "(?jmsListener\w-\d+)"  
| transaction thread startswith="LoggingMessageConverter | request:" endswith="LoggingMessageConverter | response:"   
append [ search  index="i" sourcetype="s"  
        | rex "(?&amp;lt;thread&amp;gt;http-\w+\.\w+\.\w+\.\w+/\d+\.\d+\.\d+\.\d+:\d+-\d+|jmsListener\w-\d+)"
        | transaction thread startswith="WebService Request: \&amp;lt;?xml" endswith="WebService Response: \&amp;lt;?xml"  ]
| eval ms= duration*1000 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Finally, you also had a syntax error in the second &lt;CODE&gt;rex&lt;/CODE&gt; - there is no field name. But I copied it from the other example you gave. Although I am unclear why you need either of the &lt;CODE&gt;rex&lt;/CODE&gt; commands...&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 03:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267692#M80526</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-07-21T03:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Append or join transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267693#M80527</link>
      <description>&lt;P&gt;Thanks a lot I tried with append. It works perfect!!!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 04:21:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-or-join-transactions/m-p/267693#M80527</guid>
      <dc:creator>saradachelluboy</dc:creator>
      <dc:date>2016-07-21T04:21:48Z</dc:date>
    </item>
  </channel>
</rss>

