<?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: How do you do an outer join of two stats searches? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459732#M129739</link>
    <description>&lt;P&gt;No more success with your update&lt;BR /&gt;
It's probably even worse (2 more results : 872 at first and 874 then)&lt;/P&gt;

&lt;P&gt;I'm supposed to obtain 126 customers (I've already done the job through Excel to compare results)&lt;/P&gt;</description>
    <pubDate>Tue, 06 Nov 2018 14:19:59 GMT</pubDate>
    <dc:creator>zebu14</dc:creator>
    <dc:date>2018-11-06T14:19:59Z</dc:date>
    <item>
      <title>How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459728#M129735</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to do an outer join of two searches.&lt;/P&gt;

&lt;P&gt;I have 2 server groups (Gateway="opaxvgw1" OR Gateway="opaxvgw2") and (Gateway="opaxvgw3" OR Gateway="opaxvgw4")&lt;BR /&gt;
For each group, I list the customers by the term "Penta_source".&lt;/P&gt;

&lt;P&gt;Then I want to extract the customers that are only present in one of the groups (and eliminate all the customers that are present in both)&lt;/P&gt;

&lt;P&gt;Here is my search job, but it doesn't work :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="axwaydb-prd" sourcetype=AXWAY-Stats Direction=I Gateway="opaxvgw1" OR Gateway="opaxvgw2" | stats count by Penta_source | join type=outer Penta_source [search index="axwaydb-prd" sourcetype=AXWAY-Stats Direction=I Gateway="opaxvgw3" OR Gateway="opaxvgw4" | stats count by Penta_source]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea ?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 13:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459728#M129735</guid>
      <dc:creator>zebu14</dc:creator>
      <dc:date>2018-11-06T13:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459729#M129736</link>
      <description>&lt;P&gt;Try this:  (edited)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="axwaydb-prd" sourcetype=AXWAY-Stats Direction=I Gateway IN ("opaxvgw1", "opaxvgw2", "opaxvgw3", "opaxvgw4")
| eval Group1 = if(Gateway="opaxvgw1" OR Gateway="opaxvgw2",1,0)
| eval Group2 = if(Gateway="opaxvgw3" OR Gateway="opaxvgw4",1,0)
| stats values(Group1) as Group1 values(Group2) as Group2 count by Penta_source 
| eval GroupCheck = Group1+Group2
| where GroupCheck&amp;lt;2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459729#M129736</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-11-06T14:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459730#M129737</link>
      <description>&lt;P&gt;Just tried and it gives me a lot of customers that are present in each independant search, so NOK.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459730#M129737</guid>
      <dc:creator>zebu14</dc:creator>
      <dc:date>2018-11-06T14:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459731#M129738</link>
      <description>&lt;P&gt;I have edited my previous answer.  see if that is more correct. &lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459731#M129738</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-11-06T14:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459732#M129739</link>
      <description>&lt;P&gt;No more success with your update&lt;BR /&gt;
It's probably even worse (2 more results : 872 at first and 874 then)&lt;/P&gt;

&lt;P&gt;I'm supposed to obtain 126 customers (I've already done the job through Excel to compare results)&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:19:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459732#M129739</guid>
      <dc:creator>zebu14</dc:creator>
      <dc:date>2018-11-06T14:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459733#M129740</link>
      <description>&lt;P&gt;oh! I think I see where I went wrong. my apologies. &lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459733#M129740</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-11-06T14:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459734#M129741</link>
      <description>&lt;P&gt;edited again. try once more. &lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 14:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459734#M129741</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-11-06T14:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do you do an outer join of two stats searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459735#M129742</link>
      <description>&lt;P&gt;This update seems to do the job.&lt;BR /&gt;
As I still obtain many results, let me check that everything is correct and I'll validate your solution ASAP.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 16:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-do-an-outer-join-of-two-stats-searches/m-p/459735#M129742</guid>
      <dc:creator>zebu14</dc:creator>
      <dc:date>2018-11-06T16:07:50Z</dc:date>
    </item>
  </channel>
</rss>

