<?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 Compare two fields from different sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70417#M180699</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to compare a host field from two different sources. I've managed to do that with the following serach :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/home/conf/admin/log/nouveaux_clients.txt" OR source="WinEventLog:Security" | eval common_host=coalesce(hote, host) | stats dc(source) as occur by common_host | where occur&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives me a table with all the fields that exist in both. However I'm trying to find a way to show what is in my first source but isn't in my second.&lt;/P&gt;

&lt;P&gt;Hope I was clear enough &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2013 18:38:26 GMT</pubDate>
    <dc:creator>gnoellbn</dc:creator>
    <dc:date>2013-09-23T18:38:26Z</dc:date>
    <item>
      <title>Compare two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70417#M180699</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to compare a host field from two different sources. I've managed to do that with the following serach :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/home/conf/admin/log/nouveaux_clients.txt" OR source="WinEventLog:Security" | eval common_host=coalesce(hote, host) | stats dc(source) as occur by common_host | where occur&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives me a table with all the fields that exist in both. However I'm trying to find a way to show what is in my first source but isn't in my second.&lt;/P&gt;

&lt;P&gt;Hope I was clear enough &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2013 18:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70417#M180699</guid>
      <dc:creator>gnoellbn</dc:creator>
      <dc:date>2013-09-23T18:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70418#M180700</link>
      <description>&lt;P&gt;Did you want a separate search with its own table, or did you want to modify this search to also include what is in the first by not in the second?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2013 19:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70418#M180700</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-09-23T19:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70419#M180701</link>
      <description>&lt;P&gt;I'd say on the same it would be ideal but then if it's not possible we'll manage with two different searches &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2013 19:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70419#M180701</guid>
      <dc:creator>gnoellbn</dc:creator>
      <dc:date>2013-09-23T19:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two fields from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70420#M180702</link>
      <description>&lt;P&gt;Ok, this will solve the 'exists only in first' problem.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/home/conf/admin/log/nouveaux_clients.txt" NOT [search source="WinEventLog:Security" | dedup host | rename host as hote| fields +hote]| stats values(hote) as only_in_first
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2013 20:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-two-fields-from-different-sources/m-p/70420#M180702</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-09-23T20:11:50Z</dc:date>
    </item>
  </channel>
</rss>

