<?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 check for data that is not present in csv lookup in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342444#M63076</link>
    <description>&lt;P&gt;Assuming your DHCP logs contain a field called &lt;CODE&gt;host&lt;/CODE&gt; and the CSV file contains a field called &lt;CODE&gt;hostname&lt;/CODE&gt;, your query could look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your DHCP log search that contains host field
| lookup device_hostname_lookup.csv hostname AS host OUTPUT hostname AS flag
| where isnull(flag)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is performing a lookup for the field &lt;CODE&gt;host&lt;/CODE&gt; in the source log, matching to &lt;CODE&gt;hostname&lt;/CODE&gt; in the CSV and - if there is a match - adding a field called &lt;CODE&gt;flag&lt;/CODE&gt; to the source event. The final line filters out any events that contain the field &lt;CODE&gt;flag&lt;/CODE&gt; (removing all events that had matching hostnames in the CSV file).&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 15:18:48 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2018-04-19T15:18:48Z</dc:date>
    <item>
      <title>How to check for data that is not present in csv lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342441#M63073</link>
      <description>&lt;P&gt;I have DHCP logs and a csv which contains hostnames of devices..&lt;/P&gt;

&lt;P&gt;I need to check the DHCP logs for the hostnames that are not present in the csv lookup list. &lt;/P&gt;

&lt;P&gt;Can you please suggest a query to perform this check without using subsearch? CSV has some 55K rows&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342441#M63073</guid>
      <dc:creator>nnimbe1</dc:creator>
      <dc:date>2018-04-19T13:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for data that is not present in csv lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342442#M63074</link>
      <description>&lt;P&gt;hello there, &lt;BR /&gt;
not sure how to achieve without a subsearch as you will need to compare to the lookup with &lt;CODE&gt;|inputlookup&lt;/CODE&gt;&lt;BR /&gt;
look at those answers for examples:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/31578/search-to-determine-what-is-missing-in-lookup-table.html"&gt;https://answers.splunk.com/answers/31578/search-to-determine-what-is-missing-in-lookup-table.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/142176/can-splunk-check-for-hosts-sending-data-against-a-lookup-file.html"&gt;https://answers.splunk.com/answers/142176/can-splunk-check-for-hosts-sending-data-against-a-lookup-file.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/73268/search-for-hosts-in-a-lookup-but-not-in-splunk.html"&gt;https://answers.splunk.com/answers/73268/search-for-hosts-in-a-lookup-but-not-in-splunk.html&lt;/A&gt;&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 15:14:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342442#M63074</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-04-19T15:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for data that is not present in csv lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342443#M63075</link>
      <description>&lt;P&gt;Can you try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dhcp 
| lookup dhcp_hosts hostname OUTPUT hostname as filter
| where is null(filter)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Apr 2018 15:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342443#M63075</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-19T15:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for data that is not present in csv lookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342444#M63076</link>
      <description>&lt;P&gt;Assuming your DHCP logs contain a field called &lt;CODE&gt;host&lt;/CODE&gt; and the CSV file contains a field called &lt;CODE&gt;hostname&lt;/CODE&gt;, your query could look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your DHCP log search that contains host field
| lookup device_hostname_lookup.csv hostname AS host OUTPUT hostname AS flag
| where isnull(flag)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is performing a lookup for the field &lt;CODE&gt;host&lt;/CODE&gt; in the source log, matching to &lt;CODE&gt;hostname&lt;/CODE&gt; in the CSV and - if there is a match - adding a field called &lt;CODE&gt;flag&lt;/CODE&gt; to the source event. The final line filters out any events that contain the field &lt;CODE&gt;flag&lt;/CODE&gt; (removing all events that had matching hostnames in the CSV file).&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 15:18:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-check-for-data-that-is-not-present-in-csv-lookup/m-p/342444#M63076</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-04-19T15:18:48Z</dc:date>
    </item>
  </channel>
</rss>

