<?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 search for all IP's not in a lookup table. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371171#M162078</link>
    <description>&lt;P&gt;One way, assuming the events contain a field called &lt;CODE&gt;ip&lt;/CODE&gt; and the lookup contains a field called &lt;CODE&gt;ip_address&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something NOT
[| inputlookup myspreadsheet.csv
 | fields ip
 | rename ip AS ip_address
 | format ]
| stats values(ip_address)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something 
| stats values(ip_address) AS ip_address
| lookup myspreadsheet.csv ip AS ip_address OUTPUT ip AS flag
| where isnull(flag)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 21 Mar 2018 21:36:10 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2018-03-21T21:36:10Z</dc:date>
    <item>
      <title>How to search for all IP's not in a lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371170#M162077</link>
      <description>&lt;P&gt;Basically I want to use the inputlookup myspreadsheet.csv and I want to find all IP's that are not in that .csv file.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371170#M162077</guid>
      <dc:creator>turnerde</dc:creator>
      <dc:date>2018-03-21T20:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for all IP's not in a lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371171#M162078</link>
      <description>&lt;P&gt;One way, assuming the events contain a field called &lt;CODE&gt;ip&lt;/CODE&gt; and the lookup contains a field called &lt;CODE&gt;ip_address&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something NOT
[| inputlookup myspreadsheet.csv
 | fields ip
 | rename ip AS ip_address
 | format ]
| stats values(ip_address)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=something 
| stats values(ip_address) AS ip_address
| lookup myspreadsheet.csv ip AS ip_address OUTPUT ip AS flag
| where isnull(flag)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:36:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371171#M162078</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-21T21:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for all IP's not in a lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371172#M162079</link>
      <description>&lt;P&gt;Assuming that you're wanting to exclude IPs that you're sourcing from a lookup against an index or other lookup, you could achieve this by doing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   index=myindex sourcetype=mysourcetype src_ip=* NOT [|inputlookup mylookup.csv | stats count by src_ip | fields - count] | stats count by src_ip | fields - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the IP field in your lookup differs from your indexed data, you can change via &lt;CODE&gt;|eval&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371172#M162079</guid>
      <dc:creator>jnussbaum_splun</dc:creator>
      <dc:date>2018-03-21T21:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for all IP's not in a lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371173#M162080</link>
      <description>&lt;P&gt;Just as a "so I know" follow up.  What do the  [  ] brackets do/represent in the query?  I did modify it a bit to have it organized and charted out but for the most part I believe this is working.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 13:53:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371173#M162080</guid>
      <dc:creator>turnerde</dc:creator>
      <dc:date>2018-03-22T13:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for all IP's not in a lookup table.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371174#M162081</link>
      <description>&lt;P&gt;Brackets are used in a Splunk query as the syntax for a subsearch. In this case, the subsearch is returning a list of ip addresses to be used as a search filter. &lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 16:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-all-IP-s-not-in-a-lookup-table/m-p/371174#M162081</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-03-22T16:10:06Z</dc:date>
    </item>
  </channel>
</rss>

