<?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: Using Transaction with One to Many Relationships in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63012#M15561</link>
    <description>&lt;P&gt;I can't seem to get searchtxn to work. I've defined a transaction that I have verified works with the normal transaction command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[NewMailFlowTransaction]
maxspan=24h
maxpause=24h
maxopentxn=42000
maxopenevents=400000
connected=t
fields=IronportMID,MSGID
search=host=MyExchangeServer OR host=MyIronport  (MSGID=* OR IronportMID=*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I run the search &lt;CODE&gt;| searchtxn NewMailFlowTransaction MSGID=[A Test Message ID Here]&lt;/CODE&gt; but it only ever returns the one line that contains both the MSGID and the IronportMID.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2011 00:20:48 GMT</pubDate>
    <dc:creator>David</dc:creator>
    <dc:date>2011-08-24T00:20:48Z</dc:date>
    <item>
      <title>Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63002#M15551</link>
      <description>&lt;P&gt;I've something of a challenge: How to best generate a single event in a summary index that is based on a transaction across four different fields when there is not a 1:1 relationship across all the fields. &lt;/P&gt;

&lt;P&gt;I'm trying to do a summary index with mail flow information across Exchange and Cisco Ironports. The Ironports have a MID field that is specific to each message, and an ICID and a DCID that is specific to each Incoming Connection and Destination Connection. I'd initially done a &lt;CODE&gt;transaction MSGID MID ICID DCID&lt;/CODE&gt;, but then discovered that the ICID and DCID can be used by multiple MIDs.&lt;/P&gt;

&lt;P&gt;I know I can solve this by generating an enormous table of all ICIDs, DCIDs and the information I want from them, then tossing that into a lookup table via &lt;CODE&gt;|outputlookup&lt;/CODE&gt;, but having to run that as a scheduled search that will always complete before the primary summary indexing search seems very ugly. &lt;/P&gt;

&lt;P&gt;Is there a better way?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 22:31:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63002#M15551</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-23T22:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63003#M15552</link>
      <description>&lt;P&gt;Interestingly enough, the transaction examples on the manual page ( &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Transaction&lt;/A&gt; ) will suffer the same problem. In my environment, there are about 36% more dc(MIDs) than dc(DCIDs), when doing a search for just the single log message where they co-exist.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:25:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63003#M15552</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-23T23:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63004#M15553</link>
      <description>&lt;P&gt;I am confused why you are using the summary index to track individual message transactions.  The summary index is designed to help aggregation of statistical trends.&lt;/P&gt;

&lt;P&gt;That aside, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | stats values(icid) as icid values(dcid) as dcid by mid | mvexpand icid | mvexpand dcid | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63004#M15553</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-08-23T23:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63005#M15554</link>
      <description>&lt;P&gt;In general, transaction is best reserved for situations where you want to group "events" together for viewing by an analyst.  Stats, timechart, and other reporting/transforming commands are usually a better choice for dealing with "results", population of the summary index, and similar use cases.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:31:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63005#M15554</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-08-23T23:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63006#M15555</link>
      <description>&lt;P&gt;You may want to look at the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Searchtxn"&gt;&lt;CODE&gt;searchtxn&lt;/CODE&gt;&lt;/A&gt; command. It may be better suited for what you're looking for.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Searchtxn"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Searchtxn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:40:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63006#M15555</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-08-23T23:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63007#M15556</link>
      <description>&lt;P&gt;It's also worth asking, what exactly are the results you are trying to get out at the end? i.e., why are you creating this table? Sometimes it's easier in Splunk to &lt;EM&gt;not&lt;/EM&gt; create a large intermediate result to get to where you want to go.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63007#M15556</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-08-23T23:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63008#M15557</link>
      <description>&lt;P&gt;Good point, searchtxn is a better fit for this use case than transaction.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63008#M15557</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-08-23T23:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63009#M15558</link>
      <description>&lt;P&gt;I've never looked at searchtxn before -- let me check that out.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63009#M15558</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-23T23:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63010#M15559</link>
      <description>&lt;P&gt;The rationale behind this is that I want to be able to quickly search through my email logs. The raw logs contain between 20 and 50 events for the average message, with some messages containing 200 events. All I actually want, though, is 1 event. Thus, a summary index speeds search considerably, and even more importantly, avoids the need to use transaction to get critical details. This is all before knowing about searchtxn, though, so that may be my silver bullet.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63010#M15559</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-23T23:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63011#M15560</link>
      <description>&lt;P&gt;As an aside from the main question -- suppose I'm trying to simplify 200 events down to 1 event to speed searching. It's not statistical work, not using the si commands, but speed is no less essential: is there a better way than using a summary index?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 23:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63011#M15560</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-23T23:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63012#M15561</link>
      <description>&lt;P&gt;I can't seem to get searchtxn to work. I've defined a transaction that I have verified works with the normal transaction command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[NewMailFlowTransaction]
maxspan=24h
maxpause=24h
maxopentxn=42000
maxopenevents=400000
connected=t
fields=IronportMID,MSGID
search=host=MyExchangeServer OR host=MyIronport  (MSGID=* OR IronportMID=*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I run the search &lt;CODE&gt;| searchtxn NewMailFlowTransaction MSGID=[A Test Message ID Here]&lt;/CODE&gt; but it only ever returns the one line that contains both the MSGID and the IronportMID.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 00:20:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63012#M15561</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-24T00:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Transaction with One to Many Relationships</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63013#M15562</link>
      <description>&lt;P&gt;I could replicate its results by searching for:&lt;BR /&gt;
host=MyExchangeServer OR host=MyIronport MSGID=[A Test Message ID Here] IronportMID=* | transaction MSGID&lt;/P&gt;

&lt;P&gt;I would try to research it more myself, but there appears to be a total dearth of examples on answers or the web, beyond the official manpage. Anything I can change to give searchtxn a better shot?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 00:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Transaction-with-One-to-Many-Relationships/m-p/63013#M15562</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-24T00:24:47Z</dc:date>
    </item>
  </channel>
</rss>

