<?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 Search for items not matching values from a lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250619#M74893</link>
    <description>&lt;P&gt;I have this search which basically displays if there is a hash (sha256) value in the sourcetype= software field =sha256, but NOT in the lookup field as described below. &lt;/P&gt;

&lt;P&gt;Question: how can I reverse it? is there a way where I can search the lookup field with sourcetype= software field =sha256?&lt;/P&gt;

&lt;P&gt;Current search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bigfix sourcetype=software NOT[|inputlookup Auth2_files.csv|table hash|rename hash as sha256]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Jul 2016 20:40:14 GMT</pubDate>
    <dc:creator>ashishlal82</dc:creator>
    <dc:date>2016-07-08T20:40:14Z</dc:date>
    <item>
      <title>Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250619#M74893</link>
      <description>&lt;P&gt;I have this search which basically displays if there is a hash (sha256) value in the sourcetype= software field =sha256, but NOT in the lookup field as described below. &lt;/P&gt;

&lt;P&gt;Question: how can I reverse it? is there a way where I can search the lookup field with sourcetype= software field =sha256?&lt;/P&gt;

&lt;P&gt;Current search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bigfix sourcetype=software NOT[|inputlookup Auth2_files.csv|table hash|rename hash as sha256]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2016 20:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250619#M74893</guid>
      <dc:creator>ashishlal82</dc:creator>
      <dc:date>2016-07-08T20:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250620#M74894</link>
      <description>&lt;P&gt;You can try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup Auth2_files.csv|table hash|rename hash as sha256 | search NOT [search index=bigfix sourcetype=software | stats count by sha256 | table sha256 ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bigfix sourcetype=software | stats count by sha256 | table sha256 | eval from="index" | append  [|inputlookup Auth2_files.csv|table hash|rename hash as sha256 | eval from="lookup"] | stats values(from) as from by sha256 | where mvcount(from)=1 AND from="lookup" | table sha256
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2016 20:58:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250620#M74894</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-08T20:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250621#M74895</link>
      <description>&lt;P&gt;Can I append the results from both the  query? is its possible ?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 22:13:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250621#M74895</guid>
      <dc:creator>ashishlal82</dc:creator>
      <dc:date>2016-07-08T22:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250622#M74896</link>
      <description>&lt;P&gt;If you're looking for sha256 entries unique in both index and lookup, use the second query and remove filter of from="lookup"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2016 23:13:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250622#M74896</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-08T23:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250623#M74897</link>
      <description>&lt;P&gt;Can you explain me what you did? I am getting the results but also need to understand the query&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 17:47:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250623#M74897</guid>
      <dc:creator>ashishlal82</dc:creator>
      <dc:date>2016-07-11T17:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250624#M74898</link>
      <description>&lt;P&gt;Sure&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bigfix sourcetype=software | stats count by sha256 | table sha256 | eval from="index"
       --takes sha256 entries from the index and added a field from="index"
|inputlookup Auth2_files.csv|table hash|rename hash as sha256 | eval from="lookup"
      -- takes sha256 entries from the lookup and added a field from="lookup"

| stats values(from) as from by sha256
      --this will provide from what all places a sha256 entry was found
           --Condition1: if a sha256 value is available in both index and lookup, then "from" field will have value (multivalued) as both "index" and  "lookup" and will have mvcount(from)=2
          - Condition2: if a sha256 value is only available in index, then "from" field will have value (single value) as "index" and mvcount(from)=1
           --Condition3: if a sha256 value is only available in lookup, then "from" field will have value (single value) as "lookup" and mvcount(from)=1

--Adding filter mvcount(from)=1 only will make the entries from condition 2 and 3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jul 2016 18:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250624#M74898</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-11T18:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250625#M74899</link>
      <description>&lt;P&gt;Quick Question: &lt;/P&gt;

&lt;P&gt;index=bigfix sourcetype=software NOT[|inputlookup Auth2_files.csv|table hash|rename hash as sha256].&lt;/P&gt;

&lt;P&gt;In the above query, is the splunk comparing the field "sha256" from index to lookup? trying to understand how the comparision is done and how the query works?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 19:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250625#M74899</guid>
      <dc:creator>ashishlal82</dc:creator>
      <dc:date>2016-07-11T19:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250626#M74900</link>
      <description>&lt;P&gt;This is an example of "subsearch result added as filter to base search". All the sha256 values returned from lookup will be added in the base search as a giant OR condition. The above search will be resolved as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bigfix sourcetype=software NOT ((sha256="valFromLookup1" ) OR (sha256="valFromLookup2" )...)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jul 2016 19:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250626#M74900</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-11T19:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items not matching values from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250627#M74901</link>
      <description>&lt;P&gt;I still trying to understand since the index has a sha256 with 256 hash values and the lookup has field hash with both sha256 and md5 and I would like to compare sha256 field in index with lookup field which is hash. &lt;BR /&gt;
I wrote the above query and was wondering if its right?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 19:40:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-items-not-matching-values-from-a-lookup/m-p/250627#M74901</guid>
      <dc:creator>ashishlal82</dc:creator>
      <dc:date>2016-07-11T19:40:13Z</dc:date>
    </item>
  </channel>
</rss>

