<?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: NOT Inputlookup not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452212#M168224</link>
    <description>&lt;P&gt;The inclusion file for reference purposes is configured as:&lt;/P&gt;

&lt;P&gt;agent&lt;/P&gt;

&lt;P&gt;"applicationx.exe"&lt;/P&gt;

&lt;P&gt;The file permissions are correct and the lookup is a tabled definition referencing the csv file.  &lt;/P&gt;</description>
    <pubDate>Fri, 20 Jul 2018 02:33:05 GMT</pubDate>
    <dc:creator>willadams</dc:creator>
    <dc:date>2018-07-20T02:33:05Z</dc:date>
    <item>
      <title>NOT Inputlookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452211#M168223</link>
      <description>&lt;P&gt;I am trying to perform a search and trying to add an inputlookup to filter information I don't need to know about.  For example if I run the following query&lt;/P&gt;

&lt;P&gt;index=firewall NOT [|inputlookup agent-inclusion-knownapps&lt;BR /&gt;
| where NOT cidrmatch("x.x.x.x/x",dest_ip) AND NOT cidrmatch("y.y.y.y/y",dest_ip)&lt;BR /&gt;
 | fields agent]&lt;BR /&gt;
| stats count by agent&lt;BR /&gt;
| sort -count&lt;/P&gt;

&lt;P&gt;This produces a result and the logs filter correctly (proved by removing NOT and only seeing the entries from the inputlookup; and adding the NOT and not seeing the entries from the inputlookup).  &lt;/P&gt;

&lt;P&gt;However if I then try to extend my query with the following it no longer filters and I am not sure where I have gone wrong.  The query is as follows:&lt;/P&gt;

&lt;P&gt;index=firewall "destination network"=external NOT(action=blocked) NOT [|inputlookup agent-inclusion-knownapps | where NOT cidrmatch("x.x.x.x/x",dest_ip) AND NOT cidrmatch("y.y.y.y/y",dest_ip)&lt;BR /&gt;
| fields agent]&lt;BR /&gt;
| stats count by agent username src dest dest_port rule action&lt;BR /&gt;
| sort -count&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:33:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452211#M168223</guid>
      <dc:creator>willadams</dc:creator>
      <dc:date>2020-09-29T20:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: NOT Inputlookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452212#M168224</link>
      <description>&lt;P&gt;The inclusion file for reference purposes is configured as:&lt;/P&gt;

&lt;P&gt;agent&lt;/P&gt;

&lt;P&gt;"applicationx.exe"&lt;/P&gt;

&lt;P&gt;The file permissions are correct and the lookup is a tabled definition referencing the csv file.  &lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 02:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452212#M168224</guid>
      <dc:creator>willadams</dc:creator>
      <dc:date>2018-07-20T02:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: NOT Inputlookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452213#M168225</link>
      <description>&lt;P&gt;@ willadams &lt;/P&gt;

&lt;P&gt;So your saying, by adding the below code your query is not working.&lt;BR /&gt;
If that is the scenario give a try like this.&lt;BR /&gt;
I'm not sure it will work, but this is my suggestion..&lt;/P&gt;

&lt;P&gt;"destination network"=external NOT(action=blocked)&lt;/P&gt;

&lt;P&gt;"destination network" --&amp;gt; I believe this is a value. &lt;BR /&gt;
external --&amp;gt; I Hope this is a field &lt;BR /&gt;
 try this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Index=***
"destination network"=external NOT action IN("blocked")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If "destination network" is a filed then try this     &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; Index=***
    | rename "destination network" as destination_network
    destination_network=external NOT action IN("blocked")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 05:44:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452213#M168225</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2018-07-20T05:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: NOT Inputlookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452214#M168226</link>
      <description>&lt;P&gt;I think the search sentence is not wrong.&lt;BR /&gt;
Please check the search sentence in the search log of the INSPECT JOB to see if it is the intended search sentence.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 08:33:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452214#M168226</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-07-20T08:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: NOT Inputlookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452215#M168227</link>
      <description>&lt;P&gt;Even if I omit the "destination network" the results still end up the same.  For example if I run this&lt;/P&gt;

&lt;P&gt;index=firewall NOT [|inputlookup agent-inclusion-knownapps | where NOT cidrmatch("x.x.x.x/x",dest_ip) AND NOT cidrmatch("y.y.y.y/y",dest_ip)&lt;BR /&gt;
| fields agent]&lt;BR /&gt;
| stats count by agent username src dest dest_port rule action&lt;BR /&gt;
| sort -count&lt;/P&gt;

&lt;P&gt;However I did try and remove the NOT from just before " [|inputlookup" and found that I am only getting 1 result.  It looks as though SPLUNK is not referencing my lookup properly.  &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452215#M168227</guid>
      <dc:creator>willadams</dc:creator>
      <dc:date>2020-09-29T20:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: NOT Inputlookup not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452216#M168228</link>
      <description>&lt;P&gt;For example my lookup file shows as (ignore the *)&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;agent&lt;/P&gt;

&lt;P&gt;"application1.exe"&lt;BR /&gt;
"application2.exe"&lt;BR /&gt;
"application3.exe"&lt;BR /&gt;
"application11.exe"&lt;BR /&gt;
"application22.exe"&lt;BR /&gt;
"application33.exe"&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;If I look at the data currently being referenced I get "application1.exe" and cannot see application2.exe; application3.exe etc.  it only references application1.exe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jul 2018 03:47:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/NOT-Inputlookup-not-working/m-p/452216#M168228</guid>
      <dc:creator>willadams</dc:creator>
      <dc:date>2018-07-23T03:47:07Z</dc:date>
    </item>
  </channel>
</rss>

