<?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 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226484#M66788</link>
    <description>&lt;P&gt;@somesoni&lt;/P&gt;

&lt;P&gt;rather than the stats in &lt;CODE&gt;stats values(*) as * by outside&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I would rather get just the values themselves rather than the digested stats.  Essentially the search provided gives me &lt;STRONG&gt;one result&lt;/STRONG&gt; with all joined info from something like 750 events.  I would like the table to have 750 results.  If I remove the stats, it give me the format but excludes the FireEye data. - actually sorting it anther way, removing the stats, where, and fields - commands gives me everything but the ASA and FireEye are on different rows.&lt;/P&gt;

&lt;P&gt;Do you have any suggestions?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2016 20:09:38 GMT</pubDate>
    <dc:creator>ccsfdave</dc:creator>
    <dc:date>2016-06-23T20:09:38Z</dc:date>
    <item>
      <title>Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226472#M66776</link>
      <description>&lt;P&gt;I have a search that does work but takes forever because of the amount indexed by the ASA.  I was thinking if it was reversed and looked at the fireeye first which is a smaller set, it could speed up the search.  Please advise me on what I may be able to do to speed up the search results:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Works:&lt;/STRONG&gt; &lt;CODE&gt;index=ASA host="x.x.x.x" "%ASA-6-302013" | rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s" | search outside="y.y.y.y" |join outside [search index=fe Trojan.Ransomware.Locky cs5="*" |rename cs5 as outside]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Does Not Work:&lt;/STRONG&gt; &lt;CODE&gt;index=fe Trojan.Ransomware.Locky cs5="y.y.y.y" |rename cs5 as outside |join outside [index=ASA host="x.x.x.x" "%ASA-6-302013" | rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s"]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 17:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226472#M66776</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T17:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226473#M66777</link>
      <description>&lt;P&gt;I don't see the purpose of join here. Your filter &lt;CODE&gt;"| search outside="y.y.y.y"&lt;/CODE&gt; is restricting the events from &lt;CODE&gt;index=ASA&lt;/CODE&gt;, I would rather do like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ASA host="x.x.x.x" "%ASA-6-302013" "outside:y.y.y.y/" | rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 18:14:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226473#M66777</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-23T18:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226474#M66778</link>
      <description>&lt;P&gt;The second search you are missing search term at the beginning of the subsearch &lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 18:16:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226474#M66778</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2016-06-23T18:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226475#M66779</link>
      <description>&lt;P&gt;Oh that was an oversight of the cut and paste...it's there in real life &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 18:19:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226475#M66779</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T18:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226476#M66780</link>
      <description>&lt;P&gt;The purpose of the join is that the FireEye and ASA see different data and I would like to choose from both when I create a form seeded table &lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 18:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226476#M66780</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T18:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226477#M66781</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=ASA host="x.x.x.x" "%ASA-6-302013") OR (index=fe Trojan.Ransomware.Locky cs5="*")
| rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s"
| search index=fe OR outside="y.y.y.y"
| eval outside=if((index=fe), cs5, outside)
| stats dc(index) AS indexCount values(*) AS * BY outside
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You now  have a fully joined set:&lt;BR /&gt;
For left Join, add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | search index=ASA AND indexCount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For right join, add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | search index=fe AND indexCount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For inner join, add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search indexCount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For outer join, add this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search indexCount=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 18:35:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226477#M66781</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-23T18:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226478#M66782</link>
      <description>&lt;P&gt;This is a great format but I can't say a ton faster - which is what I was originally after with this request.  Perhaps it makes no difference which dataset comes first when searching with a join.&lt;/P&gt;

&lt;P&gt;Is there a way to transaction the above that may make a difference?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:00:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226478#M66782</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T19:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226479#M66783</link>
      <description>&lt;P&gt;Try changing the first line to this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (index=ASA host="x.x.x.x" "%ASA-6-302013") OR (index=fe TERM(Trojan.Ransomware.Locky) cs5="*")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226479#M66783</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-23T19:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226480#M66784</link>
      <description>&lt;P&gt;Give this a try as well&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ASA host="x.x.x.x" "%ASA-6-302013" "*outside:y.y.y.y/*" | rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s" | eval From=1| append [search index=fe Trojan.Ransomware.Locky cs5="*" |rename cs5 as outside | eval From=2] | stats values(*) as * by outside | where mvcount(From)=2 | fields - From
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;AND&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=ASA host="x.x.x.x" "%ASA-6-302013" "*outside:y.y.y.y/*" | rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s" | eval From=1| append [search index=fe Trojan.Ransomware.Locky cs5="*" |rename cs5 as outside | eval From=2] | search outside="y.y.y.y"| stats values(*) as * by outside | where mvcount(From)=2 | fields - From
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226480#M66784</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-23T19:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226481#M66785</link>
      <description>&lt;P&gt;These are blazing fast!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:16:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226481#M66785</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T19:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226482#M66786</link>
      <description>&lt;P&gt;The trick is to filter as early as possible. (filtering ASA result in the base search itself)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:22:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226482#M66786</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-23T19:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226483#M66787</link>
      <description>&lt;P&gt;In my mind I knew something like that but if I could have vocalized what I needed to do, I probably could have accomplished it!  Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 19:24:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226483#M66787</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T19:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226484#M66788</link>
      <description>&lt;P&gt;@somesoni&lt;/P&gt;

&lt;P&gt;rather than the stats in &lt;CODE&gt;stats values(*) as * by outside&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I would rather get just the values themselves rather than the digested stats.  Essentially the search provided gives me &lt;STRONG&gt;one result&lt;/STRONG&gt; with all joined info from something like 750 events.  I would like the table to have 750 results.  If I remove the stats, it give me the format but excludes the FireEye data. - actually sorting it anther way, removing the stats, where, and fields - commands gives me everything but the ASA and FireEye are on different rows.&lt;/P&gt;

&lt;P&gt;Do you have any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226484#M66788</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T20:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226485#M66789</link>
      <description>&lt;P&gt;In that case you can use join instead of append-stats (will be slower). The append-stats would reduce the number of rows based on a common field (outside here). Generally a primary key is used to reduction in rows is somewhat acceptable/required in most requirements. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ASA host="x.x.x.x" "%ASA-6-302013" "*outside:y.y.y.y/*" | rex "outside:(?&amp;lt;outside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s.*inside:(?&amp;lt;inside&amp;gt;\b\d+.\d+.\d+.\d+\b)\/\d+\s" | join outside [search index=fe Trojan.Ransomware.Locky cs5="*" |rename cs5 as outside ] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226485#M66789</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-23T20:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with a join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226486#M66790</link>
      <description>&lt;P&gt;That is exactly what I need and maybe not blazing fast but only blistering &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 20:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-a-join/m-p/226486#M66790</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2016-06-23T20:27:39Z</dc:date>
    </item>
  </channel>
</rss>

