<?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: Results of a join search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188528#M54311</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=collaboration tag::host="outbound" sourcetype="simta" | geoip simta_client_ip | stats dc(simta_client_ip_country_name) as country_count values(simta_client_ip_country_name) as country_name values(simta_client_ip_city) as country_city values(simta_client_ip) as IPAddress by simta_authuser | rex field=simta_authuser mode=sed "s/@umich.edu*//" | sort by country_count | search country_count&amp;gt;1 | join type=left simta_authuser [search index=collaboration tag::host="outbound" sourcetype="simta" UBL | eval simta_authuser = simta_ublauthuser | fields simta_authuser simta_ublstatus ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Try this&lt;/STRONG&gt; for second requirement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=collaboration tag::host="outbound" sourcetype="simta" | geoip simta_client_ip | stats dc(simta_client_ip_country_name) as country_count values(simta_client_ip_country_name) as country_name values(simta_client_ip_city) as country_city values(simta_client_ip) as IPAddress by simta_authuser | eval shouldShow=[search index=collaboration tag::host="outbound" sourcetype="simta" "*SASL(-13*" | stats count | eval result=if(count&amp;gt;0,"\"No\"","\"Yes\"") | return $result] | where shouldShow="Yes" | fields - shouldShow| rex field=simta_authuser mode=sed "s/@umich.edu*//" | sort by country_count | search country_count&amp;gt;1 | join type=left simta_authuser [search index=collaboration tag::host="outbound" sourcetype="simta" UBL | eval simta_authuser = simta_ublauthuser | fields simta_authuser simta_ublstatus ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Jun 2014 16:28:50 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-06-04T16:28:50Z</dc:date>
    <item>
      <title>Results of a join search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188527#M54310</link>
      <description>&lt;P&gt;Hello &lt;/P&gt;

&lt;P&gt;I have the below search and it seems to work fine for the most part.  The problem is that if search 2 does not have any results the information gathered from search 1 is not displayed.  The log line with the simta_ublstatus field can either exist or not exist for the user.  There's likely a better way to do this so Im open for suggestions. &lt;/P&gt;

&lt;P&gt;index=collaboration tag::host="outbound" sourcetype="simta"&lt;BR /&gt;
| geoip simta_client_ip &lt;BR /&gt;
| stats dc(simta_client_ip_country_name) as country_count values(simta_client_ip_country_name) as country_name values(simta_client_ip_city) as country_city values(simta_client_ip) as IPAddress by simta_authuser&lt;BR /&gt;
| rex field=simta_authuser mode=sed "s/@umich.edu*//"&lt;BR /&gt;
| sort by country_count&lt;BR /&gt;
| search country_count&amp;gt;1&lt;BR /&gt;
| join simta_authuser [search index=collaboration tag::host="outbound"  sourcetype="simta" UBL&lt;BR /&gt;
   | eval simta_authuser = simta_ublauthuser&lt;BR /&gt;
   | fields simta_authuser simta_ublstatus ]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:47:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188527#M54310</guid>
      <dc:creator>brywilk_umich</dc:creator>
      <dc:date>2020-09-28T16:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Results of a join search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188528#M54311</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=collaboration tag::host="outbound" sourcetype="simta" | geoip simta_client_ip | stats dc(simta_client_ip_country_name) as country_count values(simta_client_ip_country_name) as country_name values(simta_client_ip_city) as country_city values(simta_client_ip) as IPAddress by simta_authuser | rex field=simta_authuser mode=sed "s/@umich.edu*//" | sort by country_count | search country_count&amp;gt;1 | join type=left simta_authuser [search index=collaboration tag::host="outbound" sourcetype="simta" UBL | eval simta_authuser = simta_ublauthuser | fields simta_authuser simta_ublstatus ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Try this&lt;/STRONG&gt; for second requirement.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=collaboration tag::host="outbound" sourcetype="simta" | geoip simta_client_ip | stats dc(simta_client_ip_country_name) as country_count values(simta_client_ip_country_name) as country_name values(simta_client_ip_city) as country_city values(simta_client_ip) as IPAddress by simta_authuser | eval shouldShow=[search index=collaboration tag::host="outbound" sourcetype="simta" "*SASL(-13*" | stats count | eval result=if(count&amp;gt;0,"\"No\"","\"Yes\"") | return $result] | where shouldShow="Yes" | fields - shouldShow| rex field=simta_authuser mode=sed "s/@umich.edu*//" | sort by country_count | search country_count&amp;gt;1 | join type=left simta_authuser [search index=collaboration tag::host="outbound" sourcetype="simta" UBL | eval simta_authuser = simta_ublauthuser | fields simta_authuser simta_ublstatus ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Jun 2014 16:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188528#M54311</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-04T16:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Results of a join search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188529#M54312</link>
      <description>&lt;P&gt;I see two options:&lt;/P&gt;

&lt;P&gt;1) Add a '&lt;CODE&gt;fillnull value="null" simta_ublauthuser&lt;/CODE&gt;' statement before '&lt;CODE&gt;eval simta_authuser&lt;/CODE&gt;...'&lt;/P&gt;

&lt;P&gt;2) Change the join to an outer join so rows that don't match are still returned.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 16:35:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188529#M54312</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-06-04T16:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Results of a join search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188530#M54313</link>
      <description>&lt;P&gt;that did the trick!  Now Im wondering is there a way to combine that and do a additional search by the simta_authuser so that if it finds a log line with SASL(-13) it will not display any of the results from above&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 17:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188530#M54313</guid>
      <dc:creator>brywilk_umich</dc:creator>
      <dc:date>2014-06-04T17:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Results of a join search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188531#M54314</link>
      <description>&lt;P&gt;Try the updated answer. The condition is added in the middle (subsearch after "eval shouldShow...")&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2014 17:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Results-of-a-join-search/m-p/188531#M54314</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-04T17:58:54Z</dc:date>
    </item>
  </channel>
</rss>

