<?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: Transaction - Related Events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33571#M7147</link>
    <description>&lt;P&gt;Thank you for this. That makes sense. Is there a way, then, to define that I want to search for that method=ABC but also connect the 2 events based on the matching txnid?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Nov 2012 07:50:21 GMT</pubDate>
    <dc:creator>shonky</dc:creator>
    <dc:date>2012-11-14T07:50:21Z</dc:date>
    <item>
      <title>Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33569#M7145</link>
      <description>&lt;P&gt;I've been working for a while at extracting fields from joined events. At the moment I have (a simplified version):&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;2012-11-14 04:23:58.7730 (bzdate=20121113) txnid=1234 amount=$31.25 method = ABC&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;index=XYZ method = ABC | fields bzdate txnid amount&lt;/P&gt;

&lt;P&gt;However before this I have:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;012-11-14 04:23:58.4755  (bzdate=20121113) txnid=1234  XML: &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;
&lt;RESPONSE&gt;&lt;BR /&gt;
  &lt;TENDER&gt;&lt;BR /&gt;
    &lt;AMOUNTAUTHORISED&gt;31.25&lt;/AMOUNTAUTHORISED&gt;&lt;BR /&gt;
    &lt;SUCCESS&gt;true&lt;/SUCCESS&gt;&lt;BR /&gt;
  &lt;/TENDER&gt;&lt;BR /&gt;
&lt;/RESPONSE&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I think I need to use &lt;STRONG&gt;xmlkv&lt;/STRONG&gt; as well as the &lt;STRONG&gt;transaction&lt;/STRONG&gt; command to extract these. But I'm unsure how to "link" the 2 transactions. &lt;/P&gt;

&lt;P&gt;I tried something like:&lt;/P&gt;

&lt;P&gt;index=XYZ method = ABC | transaction txnid | xmlkv | fields bzdate txnid amount amountAuthorised&lt;/P&gt;

&lt;P&gt;But no avail thus far. Unfortunately I can't be sure exactly how far apart the 2 events will be (they won't be a large amount apart) and there will be a lot of "noise" around these entries.&lt;/P&gt;

&lt;P&gt;Thanks for any assistance&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 05:22:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33569#M7145</guid>
      <dc:creator>shonky</dc:creator>
      <dc:date>2012-11-14T05:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33570#M7146</link>
      <description>&lt;P&gt;Your second search filters by method=ABC - however, your XML event does not appear to contain such a field. As a result your transaction command only gets to see half the story.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 07:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33570#M7146</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-11-14T07:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33571#M7147</link>
      <description>&lt;P&gt;Thank you for this. That makes sense. Is there a way, then, to define that I want to search for that method=ABC but also connect the 2 events based on the matching txnid?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 07:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33571#M7147</guid>
      <dc:creator>shonky</dc:creator>
      <dc:date>2012-11-14T07:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33572#M7148</link>
      <description>&lt;P&gt;You could apply the method filter after the transaction command. Whether this yields the result you have in mind depends on your data. Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo | transaction bar | search method=baz | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Nov 2012 07:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33572#M7148</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-11-14T07:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33573#M7149</link>
      <description>&lt;P&gt;Just rearrange your search a bit. First create a transaction based on the txnid, THEN search for transactions that have method=ABC.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=XYZ | transaction txnid | xmlkv | search method=ABC | fields bzdate txnid amount amountAuthorised
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: Or, because transaction is kind of a resource intensive command, you could use a subsearch that filters out all txnid's that have method=ABC and THEN call transaction.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* [search index=XYZ method=ABC | fields index txnid] | transaction txnid | xmlkv | fields bzdate txnid amount amountAuthorised
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Nov 2012 09:11:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33573#M7149</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-14T09:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33574#M7150</link>
      <description>&lt;P&gt;I think both will work, but you're right, the 1st method is killing me on speed as Transaction is slowing it down so much. &lt;/P&gt;

&lt;P&gt;The 2nd one looks interesting but am seeing&lt;/P&gt;

&lt;P&gt;"Search operation 'index' is unknown. You might not have permission to run this operation."&lt;/P&gt;

&lt;P&gt;Am guessing I may need to talk to our Splunk admins to see what needs to be enabled.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 17:09:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33574#M7150</guid>
      <dc:creator>shonky</dc:creator>
      <dc:date>2012-11-14T17:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction - Related Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33575#M7151</link>
      <description>&lt;P&gt;No, that sounds like you didn't enter the search correctly. You need to start off with specifying the "search" command in subsearches. So, &lt;CODE&gt;[index=XYZ ...]&lt;/CODE&gt; will not work but &lt;CODE&gt;[search index=XYZ ...]&lt;/CODE&gt; will.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 18:18:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-Related-Events/m-p/33575#M7151</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-14T18:18:51Z</dc:date>
    </item>
  </channel>
</rss>

