<?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: How to ignore cidr from a lookup file in a search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208925#M60998</link>
    <description>&lt;P&gt;I see what you are talking about re logic and have added another field to the file with Y &lt;/P&gt;

&lt;P&gt;unfortunately I just have standard user access and do not have admin privileges and can not log onto the server to edit conf files etc, which appears to be a requirement of the solutions provided in the link.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Sep 2015 13:29:17 GMT</pubDate>
    <dc:creator>stephen123</dc:creator>
    <dc:date>2015-09-10T13:29:17Z</dc:date>
    <item>
      <title>How to ignore cidr from a lookup file in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208923#M60996</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I have a large list of IP ranges in a lookup file. I want to ignore these in a search.&lt;/P&gt;

&lt;P&gt;I can do the following for one specific IP range which works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=uk |where not cidrmatch("1.2.3.0/24",remote_ip)  | top remote_ip  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I am struggling to get it to work with a lookup. I think I need to replace the IP with a subsearch doing the lookup from the file such as&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=uk |where not cidrmatch([search inputlookup ips |fields cidr],remote_ip)  | top remote_ip   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where the lookup definition is called ips and the only field is called cidr, but this doesn’t work.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2015 11:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208923#M60996</guid>
      <dc:creator>stephen123</dc:creator>
      <dc:date>2015-09-10T11:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore cidr from a lookup file in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208924#M60997</link>
      <description>&lt;P&gt;I believe you are trying to do this, right?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/5916/using-cidr-in-a-lookup-table.html"&gt;http://answers.splunk.com/answers/5916/using-cidr-in-a-lookup-table.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The trick is that you will have to have some other field in the lookup to trigger your NOT logic.  Let us say the field is called &lt;CODE&gt;Matched&lt;/CODE&gt; (it doesn't matter what the value is, so long as it is non-null, but you would probably always set it to &lt;CODE&gt;Y&lt;/CODE&gt;), then you search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=uk |where isnull(Matched)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The idea is that your IP passed through the lookup but did not match any CIDR so the &lt;CODE&gt;Matched&lt;/CODE&gt; field did not get created.  Only get those.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2015 12:04:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208924#M60997</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-10T12:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore cidr from a lookup file in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208925#M60998</link>
      <description>&lt;P&gt;I see what you are talking about re logic and have added another field to the file with Y &lt;/P&gt;

&lt;P&gt;unfortunately I just have standard user access and do not have admin privileges and can not log onto the server to edit conf files etc, which appears to be a requirement of the solutions provided in the link.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2015 13:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208925#M60998</guid>
      <dc:creator>stephen123</dc:creator>
      <dc:date>2015-09-10T13:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore cidr from a lookup file in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208926#M60999</link>
      <description>&lt;P&gt;All of this can be done through the GUI, too (you will have to click &lt;CODE&gt;Advanced Options&lt;/CODE&gt; in many places).   Do you have privileges to do &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Fields&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Field Extractions&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;?  If so, you can do it through the GUI instead of accessing the files directly.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2015 13:46:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-cidr-from-a-lookup-file-in-a-search/m-p/208926#M60999</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-10T13:46:51Z</dc:date>
    </item>
  </channel>
</rss>

