<?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: Join Datasets from two sourcetypes but only display them if there is a dataset on the left side in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311962#M93457</link>
    <description>&lt;P&gt;Thanks for your answer but this does not work. When I add the &lt;CODE&gt;where isnotnull(source_adddress)&lt;/CODE&gt; splunk does not find any results anymore. I also added the available fields to my initial post.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2017 07:55:17 GMT</pubDate>
    <dc:creator>davidb89</dc:creator>
    <dc:date>2017-07-13T07:55:17Z</dc:date>
    <item>
      <title>Join Datasets from two sourcetypes but only display them if there is a dataset on the left side</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311960#M93455</link>
      <description>&lt;P&gt;This Question is based on &lt;A href="https://answers.splunk.com/answers/554502/use-join-but-also-display-non-matching-datasets.html" target="_blank"&gt;this question&lt;/A&gt; which solved my initial problem but created a new one. No matter which of this solutions I use:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype="pfsensefirewall" source_address=10.0.2.10 firewall_action=block | join type=left source_address, source_port, destinatin_port, destination_address [search sourcetype=nxlog_sysmon  | stats count by SourceIp SourcePort DestinationPort DestinationoIp | rename SourceIp AS source_address, SourcePort AS source_port, DestinationPort AS destination_port, DestinationIp AS destination_address] | table source_address, destination_address, destination_port, Image
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ( sourcetype="pfsensefirewall" source_address=10.0.2.10 firewall_action=block) OR (sourcetype=nxlog_sysmon)
 | eval source_address=coalesce(source_address,SourceIp) | eval source_port=coalesce(source_port,SourcePort)
 | eval destination_address=coalesce(destination_address,DestinationIp) | eval destination_port=coalesce(destination_port,DestinationPort)
 | stats values(Image) as Image by source_address, destination_address, destination_port
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It basicly works but then it also displays datasets that are only present on the right side but not on the left side. I want to have all the datasets from the left side extended by fields from the right side. Or in a more comprehensible way: I want to extend the entries from our firewalls by the entries generated on our endpoints but I don't want to have endpoint information without a correlating dataset from our firewalls.&lt;/P&gt;

&lt;P&gt;// The fields available and relevant for this sourcetypes are:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;pfsenesefirewall&lt;/STRONG&gt;: source_address, destination_address, message_section, protocol, source_port, destination_port, firewall_ip, tcp_flags&lt;BR /&gt;
&lt;STRONG&gt;nxlog_sysmon&lt;/STRONG&gt;: SourceIp, DestinationIp, SourcePort, DestinationPort, Protocol, Image&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:54:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311960#M93455</guid>
      <dc:creator>davidb89</dc:creator>
      <dc:date>2020-09-29T14:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Join Datasets from two sourcetypes but only display them if there is a dataset on the left side</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311961#M93456</link>
      <description>&lt;P&gt;Since we are not seeing the visualization/table, it would be more helpful if you add field name for left side and right side. Looking at your query I think you need rows which have source_address always present. You can add isnotnull() condition check accordingly. Here is updated second query.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| stats values(Image) as Image by source_address, destination_address, destination_port
| where isnotnull(source_adddress)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and let us know.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 07:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311961#M93456</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-13T07:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Join Datasets from two sourcetypes but only display them if there is a dataset on the left side</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311962#M93457</link>
      <description>&lt;P&gt;Thanks for your answer but this does not work. When I add the &lt;CODE&gt;where isnotnull(source_adddress)&lt;/CODE&gt; splunk does not find any results anymore. I also added the available fields to my initial post.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 07:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311962#M93457</guid>
      <dc:creator>davidb89</dc:creator>
      <dc:date>2017-07-13T07:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Join Datasets from two sourcetypes but only display them if there is a dataset on the left side</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311963#M93458</link>
      <description>&lt;P&gt;Please add data examples as well, to explain as to what you mean by dataset on the left side.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jul 2017 18:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311963#M93458</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-15T18:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Join Datasets from two sourcetypes but only display them if there is a dataset on the left side</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311964#M93459</link>
      <description>&lt;P&gt;have you double checked that you have data that meets the criteria. you have a SourceIp, DestinationIp, SourcePort and DestinationPort from nxlog_sysmon that all match to a source_address, destination_address, destination_port and source_port from pfsenesefirewall?&lt;/P&gt;

&lt;P&gt;I see you're looking specifically at &lt;STRONG&gt;source_address=10.0.2.10&lt;/STRONG&gt; above, in pfsenesefirewall, does SourceIp=10.0.2.10 in nxlog_sysmon exist with the exact same other criteria you're matching on?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:57:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311964#M93459</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2020-09-29T14:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Join Datasets from two sourcetypes but only display them if there is a dataset on the left side</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311965#M93460</link>
      <description>&lt;P&gt;Replace your stats with these -&lt;/P&gt;

&lt;P&gt;| stats values(Image) as Image, values(sourcetype) as sourcetype, values(source_port) as source_port by source_address, destination_address, destination_port&lt;BR /&gt;
  | search match(sourcetype,"pfsensefirewall")&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:55:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-Datasets-from-two-sourcetypes-but-only-display-them-if/m-p/311965#M93460</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-09-29T14:55:43Z</dc:date>
    </item>
  </channel>
</rss>

