<?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: Multiline Interleaved Transactions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiline-Interleaved-Transactions/m-p/64775#M16000</link>
    <description>&lt;P&gt;Figured it out. I was missing the field-list. The answer is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;
| rex field=_raw "^.+exec-(?&lt;THR_ID&gt;d{2})" | transaction thr_id startswith="UserId:" endswith="LookupResultsComplete"
&lt;/THR_ID&gt;&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2013 21:36:29 GMT</pubDate>
    <dc:creator>chiu_szeto_jpmc</dc:creator>
    <dc:date>2013-09-16T21:36:29Z</dc:date>
    <item>
      <title>Multiline Interleaved Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiline-Interleaved-Transactions/m-p/64774#M15999</link>
      <description>&lt;P&gt;I have a log file that contains multiple transactions. These transactions can span multiple lines. Since this is a multithreaded application, the transactions recorded for each user is interleaved. Fortunately, there is a thread id that I can use to segment each transaction.&lt;/P&gt;

&lt;P&gt;How do I generate a transaction record for each user transaction?&lt;/P&gt;

&lt;P&gt;Sample Data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;
2013-09-15 08:09:49,371 127.0.0.1-exec-12 INFO UserId: abc123
2013-09-15 08:09:49,372 127.0.0.1-exec-12 INFO UserPartLookup?itemId=568
2013-09-15 08:09:49,387 127.0.0.1-exec-17 INFO UserId: xyz678
2013-09-15 08:09:49,392 127.0.0.1-exec-12 INFO LookupResultsComplete
2013-09-15 08:09:49,395 127.0.0.1-exec-17 INFO UserOrder?itemId=568
2013-09-15 08:09:49,392 127.0.0.1-exec-17 INFO LookupResultsComplete
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output Should be:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
2013-09-15 08:09:49,371 127.0.0.1-exec-12 INFO UserId: abc123&lt;BR /&gt;
2013-09-15 08:09:49,372 127.0.0.1-exec-12 INFO UserPartLookup?itemId=568&lt;BR /&gt;
2013-09-15 08:09:49,392 127.0.0.1-exec-12 INFO LookupResultsComplete&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;2013-09-15 08:09:49,387 127.0.0.1-exec-17 INFO UserId: xyz678&lt;BR /&gt;
2013-09-15 08:09:49,395 127.0.0.1-exec-17 INFO UserOrder?itemId=568&lt;BR /&gt;
2013-09-15 08:09:49,392 127.0.0.1-exec-17 INFO LookupResultsComplete&lt;BR /&gt;
&lt;/P&gt;

&lt;P&gt;My guess is the search should be something like: | rex field=_raw "^.+exec-(?&lt;THR_ID&gt;\d{2})" | transaction startswith="UserId:" endswith="LookupResultsComplete"&lt;/THR_ID&gt;&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiline-Interleaved-Transactions/m-p/64774#M15999</guid>
      <dc:creator>chiu_szeto_jpmc</dc:creator>
      <dc:date>2020-09-28T14:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiline Interleaved Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiline-Interleaved-Transactions/m-p/64775#M16000</link>
      <description>&lt;P&gt;Figured it out. I was missing the field-list. The answer is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;
| rex field=_raw "^.+exec-(?&lt;THR_ID&gt;d{2})" | transaction thr_id startswith="UserId:" endswith="LookupResultsComplete"
&lt;/THR_ID&gt;&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2013 21:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiline-Interleaved-Transactions/m-p/64775#M16000</guid>
      <dc:creator>chiu_szeto_jpmc</dc:creator>
      <dc:date>2013-09-16T21:36:29Z</dc:date>
    </item>
  </channel>
</rss>

