<?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: Compare 2 lookup to show non match info in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660191#M227894</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;it works great as expected, but is there any way to flag or highlight the differentiate value.&lt;/P&gt;&lt;P&gt;because there are 3 fields are compared. so i need to check both lookup in order to find the missing info.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 02:47:15 GMT</pubDate>
    <dc:creator>Akmal57</dc:creator>
    <dc:date>2023-10-10T02:47:15Z</dc:date>
    <item>
      <title>Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660187#M227892</link>
      <description>&lt;P&gt;Hi, I have 2 lookup which is lookup A and lookup B. My lookup A will be keep update by splunk query and my lookup B is maintain manually.&lt;/P&gt;&lt;P&gt;Both lookup contain same fields which is Hostname, IP and OS.&lt;/P&gt;&lt;P&gt;I need to compare both lookup and bring out the non match Hostname and IP.&lt;/P&gt;&lt;P&gt;Please assist me on this.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 02:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660187#M227892</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-10-10T02:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660190#M227893</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254344"&gt;@Akmal57&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_A
| eval origin="A"
| inputlookup append=t lookup_B
| eval origin=coalesce(origin, "B")
| stats dc(origin) as originCount values(origin) as origins by Hostname IP OS
| where originCount=1
&lt;/LI-CODE&gt;&lt;P&gt;where you load both inputs and set origin value to be where the data come, then join the two together with stats and show only those that have a single origin&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 02:21:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660190#M227893</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-10-10T02:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660191#M227894</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;it works great as expected, but is there any way to flag or highlight the differentiate value.&lt;/P&gt;&lt;P&gt;because there are 3 fields are compared. so i need to check both lookup in order to find the missing info.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 02:47:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660191#M227894</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-10-10T02:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660217#M227899</link>
      <description>&lt;P&gt;Because there are three fields, you need to be more descriptive about how want the differences to be highlighted. &amp;nbsp;Maybe you can illustrate different data combinations and desired results?&lt;/P&gt;&lt;P&gt;To start,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;'s formula outputs a line when any field is different; there can be one, two, or three fields that are different. (Also thanks for a great demonstration of the append option in inputlookup!) &amp;nbsp;Let me start with an example.&lt;/P&gt;&lt;TABLE border="1" width="64.85558712121212%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.493003969657664%"&gt;lookup_A.csv&lt;/TD&gt;&lt;TD width="31.36329606106097%"&gt;lookup_B.csv&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.493003969657664%"&gt;Hostname,IP,OS&lt;BR /&gt;splunk.com,10.0.0.1,MacOS&lt;BR /&gt;youtube.com,10.0.0.2,Linux&lt;BR /&gt;google.com,10.0.0.3,Windows&lt;BR /&gt;infoseek.com,10.0.0.5,Solaris&lt;BR /&gt;yahoo.com,10.0.0.4,AIX&lt;/TD&gt;&lt;TD width="31.36329606106097%"&gt;Hostname,IP,OS&lt;BR /&gt;splunk.com,10.0.0.1,MacOS&lt;BR /&gt;youtube.com,10.0.0.2,Linux&lt;BR /&gt;google.com,10.0.0.8,Windows&lt;BR /&gt;yahoo.com,10.0.0.4,Windows&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here, I only illustrated two variations. &amp;nbsp;There can be more. &amp;nbsp;Specifically, I didn't make variance in Hostname. &amp;nbsp;But I will use it to anchor other variants. &amp;nbsp;If Hostname is also variant, the following formula will still work if you anchor on Hostname; if you anchor on another field, the answer will be rather different depending on other choices you may make.&lt;/P&gt;&lt;P&gt;To highlight differences anchored on Hostname (i.e., based on the assumption that hostname is unique), you can do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup_A.csv
| eval origin = "A"
| inputlookup append=t lookup_B.csv
| eval origin = coalesce(origin, "B")
| stats dc(origin) as originCount values(origin) as origins by Hostname IP OS
| where originCount=1
| fields - originCount
| stats list(*) as * by Hostname
| foreach IP OS ``` anchor on Hostname, seek variance in IP, OS ```
    [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = if(mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 0) == mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 1), mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 0), mvzip(origins, &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, ":"))]
| fields - origins&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above sample data will give&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Hostname&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;IP&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;OS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;google.com&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;A:10.0.0.3&lt;/DIV&gt;&lt;DIV class=""&gt;B:10.0.0.8&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;Windows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;infoseek.com&lt;/TD&gt;&lt;TD&gt;A:10.0.0.5&lt;/TD&gt;&lt;TD&gt;A:Solaris&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;yahoo.com&lt;/TD&gt;&lt;TD&gt;10.0.0.4&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;A:AIX&lt;/DIV&gt;&lt;DIV class=""&gt;B:Windows&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Is this something you could use?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 09:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660217#M227899</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-10-10T09:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660218#M227900</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think i want as your example. but what field should i put for below eval?&lt;/P&gt;&lt;PRE&gt;[eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = if(mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 0) == mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 1), mvindex(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, 0), mvzip(origins, &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, ":"))]
| fields - origins&lt;/PRE&gt;&lt;P&gt;is it os or ip?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 09:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660218#M227900</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-10-10T09:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660219#M227901</link>
      <description>&lt;P&gt;because i cannot use the eval 2 times&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 09:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660219#M227901</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-10-10T09:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660224#M227904</link>
      <description>&lt;P&gt;This subsearch iterates &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; between IP and OS. &amp;nbsp;So, both. (&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; is not meta code; it is part of &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Foreach" target="_blank" rel="noopener"&gt;foreach&lt;/A&gt; syntax.)&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 09:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660224#M227904</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-10-10T09:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 lookup to show non match info</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660350#M227949</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;, noted on that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your assist on this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;its really helpful&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 07:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-lookup-to-show-non-match-info/m-p/660350#M227949</guid>
      <dc:creator>Akmal57</dc:creator>
      <dc:date>2023-10-11T07:02:32Z</dc:date>
    </item>
  </channel>
</rss>

