<?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: Help with a join command in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344919#M63404</link>
    <description>&lt;P&gt;Hey @stwong, if they solved your problem, please don't forget to accept an answer! You can upvote posts as well. (Karma points will be awarded for either action.) Happy Splunking!&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 00:09:58 GMT</pubDate>
    <dc:creator>lfedak_splunk</dc:creator>
    <dc:date>2017-09-22T00:09:58Z</dc:date>
    <item>
      <title>Help with a join command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344916#M63401</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'd like to join 2 Windows events using instance_ID as following:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype="WinEventLog:security"  EventCode=299 | join instance_ID [search sourcetype="WinEventLog:security" EventCode=500]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;For fields common to both searches, only the one in subsearch can be retained e.g. EventCode=500 in above search.&lt;BR /&gt;&lt;BR /&gt;
Shall I rename such fields in either main or subsearch (except the ones used in join) before joining ?&lt;/P&gt;

&lt;P&gt;Off-topic: will there be ways faster than join for the same query?&lt;/P&gt;

&lt;P&gt;Sorry for the newbie question.&lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;BR /&gt;
Rgds&lt;BR /&gt;
/ST Won&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 12:09:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344916#M63401</guid>
      <dc:creator>stwong</dc:creator>
      <dc:date>2017-09-21T12:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344917#M63402</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;When you do not specify a join type, by default it takes an inner join . so the results you are getting are from the common fields of instance_id...read more here, specifically the Venn diagram &lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Join"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Join&lt;/A&gt;&lt;BR /&gt;
And yes, looks like we can avoid the join what exactly is your requirement? no reason why we need a join from same index/ sourcetypes....we can probably do it better and faster using stats &lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 12:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344917#M63402</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-21T12:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344918#M63403</link>
      <description>&lt;P&gt;Hi stwong,&lt;BR /&gt;
at first check if you have upper and lower cases in instance_ID.&lt;/P&gt;

&lt;P&gt;Often (not always!) you can use stats count instead join that it's faster, something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="WinEventLog:security" (EventCode=299 OR EventCode=500)
| stats coun by instance_ID 
| where count&amp;gt;2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 12:24:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344918#M63403</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-21T12:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344919#M63404</link>
      <description>&lt;P&gt;Hey @stwong, if they solved your problem, please don't forget to accept an answer! You can upvote posts as well. (Karma points will be awarded for either action.) Happy Splunking!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 00:09:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344919#M63404</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-09-22T00:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344920#M63405</link>
      <description>&lt;P&gt;If you want action like a search sentence, you will need "rename".&lt;/P&gt;

&lt;P&gt;If you want to group, there is a "transaction" command.&lt;BR /&gt;
sourcetype="WinEventLog:security" | transaction instance_ID&lt;/P&gt;

&lt;P&gt;Please try it.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 02:00:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344920#M63405</guid>
      <dc:creator>oda</dc:creator>
      <dc:date>2017-09-22T02:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join command</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344921#M63406</link>
      <description>&lt;P&gt;Thanks for all your replies.&lt;/P&gt;

&lt;P&gt;We're doing query to correlate some windows event, and keep all fields in all 3 related events. some of the fields in different events have the same field name.&lt;/P&gt;

&lt;P&gt;event a:&lt;BR /&gt;
field1 -&amp;gt; find event b&lt;BR /&gt;
field2 -&amp;gt; find event c&lt;BR /&gt;
field3&lt;BR /&gt;
field 20...&lt;/P&gt;

&lt;P&gt;event b:&lt;BR /&gt;
field 1&lt;BR /&gt;
field 10&lt;BR /&gt;
field 11&lt;BR /&gt;
field 20&lt;/P&gt;

&lt;P&gt;event c:&lt;BR /&gt;
field 2&lt;BR /&gt;
field 15&lt;BR /&gt;
field 16&lt;BR /&gt;
field 20&lt;/P&gt;

&lt;P&gt;Seems using join repeatedly + rename works.&lt;/P&gt;

&lt;P&gt;Thanks again.&lt;BR /&gt;
/st&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 17:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-a-join-command/m-p/344921#M63406</guid>
      <dc:creator>stwong</dc:creator>
      <dc:date>2017-09-29T17:09:17Z</dc:date>
    </item>
  </channel>
</rss>

