<?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: Search for items NOT matching in a lookup from stats table in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368086#M6003</link>
    <description>&lt;P&gt;If we have your lookup create an additional field, then we can filter and show only those that are not in your lookup (e.g. those that do not have the new field)... Like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;base&amp;gt; | stats ... | where ... | lookup server_assets IP_Address as src_ip OUTPUT IP_Address | where isnull(IP_Address) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Dec 2017 04:32:15 GMT</pubDate>
    <dc:creator>acharlieh</dc:creator>
    <dc:date>2017-12-29T04:32:15Z</dc:date>
    <item>
      <title>Search for items NOT matching in a lookup from stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368085#M6002</link>
      <description>&lt;P&gt;I have found many answers but none seem to satisfy what I am trying to accomplish.&lt;/P&gt;

&lt;P&gt;I am looking through some juniper logs and am making a table of IP's that are talking to a number of hosts.  (will have a threshold).  But I want to then take those noisy IP's and compare them to a lookup table of mine.&lt;/P&gt;

&lt;P&gt;My search:&lt;BR /&gt;&lt;BR /&gt;
index=juniper src_ip!=10.10.254.* | stats dc(dest_ip) as IP_Count by src_ip | where IP_Count&amp;gt;50 |&lt;/P&gt;

&lt;P&gt;Where would I insert my 'NOT' lookup command or if that is something I would even use?&lt;/P&gt;

&lt;P&gt;This works:  index=juniper src_ip!=10.10.24.* | stats dc(dest_ip) as IP_Count by src_ip | where IP_Count&amp;gt;50 | lookup server_assets IP_Address as src_ip&lt;/P&gt;

&lt;P&gt;But I dont want to see the things listed in this, I want to see the ones that do not match in the lookup.&lt;/P&gt;

&lt;P&gt;Any Idears?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:27:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368085#M6002</guid>
      <dc:creator>martincd537</dc:creator>
      <dc:date>2020-09-29T17:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items NOT matching in a lookup from stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368086#M6003</link>
      <description>&lt;P&gt;If we have your lookup create an additional field, then we can filter and show only those that are not in your lookup (e.g. those that do not have the new field)... Like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;base&amp;gt; | stats ... | where ... | lookup server_assets IP_Address as src_ip OUTPUT IP_Address | where isnull(IP_Address) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Dec 2017 04:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368086#M6003</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2017-12-29T04:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items NOT matching in a lookup from stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368087#M6004</link>
      <description>&lt;P&gt;That is what I ended up doing.  Thought there might be a different way.  But thank you, I will leave it like that.&lt;/P&gt;

&lt;P&gt;Ended up with this:&lt;/P&gt;

&lt;P&gt;index=juniper src_ip!=10.10.24.* | stats dc(dest_port) as Port_Count by src_ip | where Port_Count&amp;gt;50 | lookup server_assets IP_Address as src_ip | where isnull(DNSName) | table src_ip Port_Count&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:27:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368087#M6004</guid>
      <dc:creator>martincd537</dc:creator>
      <dc:date>2020-09-29T17:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Search for items NOT matching in a lookup from stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368088#M6005</link>
      <description>&lt;P&gt;That is what I ended up doing.  Just from my readings, I thought it may have been a round about way to do it, but gets the job done.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Ended up with this:&lt;/P&gt;

&lt;P&gt;index=juniper src_ip!=10.10.24.* | stats dc(dest_port) as Port_Count by src_ip | where Port_Count&amp;gt;50 | lookup server_assets IP_Address as src_ip | where isnull(DNSName) | table src_ip Port_Count&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:27:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Search-for-items-NOT-matching-in-a-lookup-from-stats-table/m-p/368088#M6005</guid>
      <dc:creator>martincd537</dc:creator>
      <dc:date>2020-09-29T17:27:30Z</dc:date>
    </item>
  </channel>
</rss>

