<?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: Source from inputlookup to negative match against index in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Source-from-inputlookup-to-negative-match-against-index/m-p/320895#M59880</link>
    <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dev_applications 
| stats count by url_host 
| table url_host | rename url_host as app | eval hasEvent=1
| append [| | inputlookup application_names.csv | table app| dedup app | eval hasEvent=0]
| stats max(hasEvent) as hasEvent by app
| where hasEvent=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Dec 2017 23:14:36 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-12-05T23:14:36Z</dc:date>
    <item>
      <title>Source from inputlookup to negative match against index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Source-from-inputlookup-to-negative-match-against-index/m-p/320894#M59879</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;

&lt;P&gt;I am trying to source from a CSV, do a negative lookup against an index, and then output anything from the CSV that did not return results in the index.  &lt;/P&gt;

&lt;P&gt;Our CSV contains a list of web applications.  I want to take this list and run it against an index that contains web logs and output applications haven't produced logs in the past 30 days.&lt;/P&gt;

&lt;P&gt;The CSV contains the following columns with app being the application name:&lt;BR /&gt;
guid,app,version,epoch_time&lt;/P&gt;

&lt;P&gt;The index has a field called url_host that exists on web log events and is the application name.&lt;/P&gt;

&lt;P&gt;Here is what I have so far that is &lt;EM&gt;sort&lt;/EM&gt; of working:&lt;/P&gt;

&lt;P&gt;| inputlookup application_names.csv | dedup app | eval url_host=app | fields url_host | search NOT [search index=dev_applications | dedup url_host | fields url_host ] | sort url_host &lt;/P&gt;

&lt;P&gt;In my output, I am still getting application names that have events in the dev_applications index so it appears not everything is getting filtered out.  Not sure if I am doing something wrong or possibly hitting a subsearch limit of some kind.  &lt;/P&gt;

&lt;P&gt;I've been banging my head against this for a few hours...any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Source-from-inputlookup-to-negative-match-against-index/m-p/320894#M59879</guid>
      <dc:creator>coryjett</dc:creator>
      <dc:date>2020-09-29T17:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Source from inputlookup to negative match against index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Source-from-inputlookup-to-negative-match-against-index/m-p/320895#M59880</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dev_applications 
| stats count by url_host 
| table url_host | rename url_host as app | eval hasEvent=1
| append [| | inputlookup application_names.csv | table app| dedup app | eval hasEvent=0]
| stats max(hasEvent) as hasEvent by app
| where hasEvent=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 23:14:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Source-from-inputlookup-to-negative-match-against-index/m-p/320895#M59880</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-05T23:14:36Z</dc:date>
    </item>
  </channel>
</rss>

