<?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 How to search using a list as input? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47263#M11281</link>
    <description>&lt;P&gt;I have a list of domain names in an input file. I have a log source with a bunch of dns logs. I want to return any logs tha have even a partial match of the dns names.&lt;/P&gt;

&lt;P&gt;So dns.txt has:&lt;/P&gt;

&lt;P&gt;blah.com&lt;BR /&gt;
lol.com&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;And my log source has a field called "hostname" that might be like "toad.blah.com". If blah.com from dns.txt matches as a substring in the hostname field, then I want to see that log in my result set.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 09 May 2012 17:34:56 GMT</pubDate>
    <dc:creator>four</dc:creator>
    <dc:date>2012-05-09T17:34:56Z</dc:date>
    <item>
      <title>How to search using a list as input?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47263#M11281</link>
      <description>&lt;P&gt;I have a list of domain names in an input file. I have a log source with a bunch of dns logs. I want to return any logs tha have even a partial match of the dns names.&lt;/P&gt;

&lt;P&gt;So dns.txt has:&lt;/P&gt;

&lt;P&gt;blah.com&lt;BR /&gt;
lol.com&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;And my log source has a field called "hostname" that might be like "toad.blah.com". If blah.com from dns.txt matches as a substring in the hostname field, then I want to see that log in my result set.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2012 17:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47263#M11281</guid>
      <dc:creator>four</dc:creator>
      <dc:date>2012-05-09T17:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to search using a list as input?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47264#M11282</link>
      <description>&lt;P&gt;You'd do something like this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=*whatever* [inputlookup dns.txt.csv | fields hostname | rename hostname as search]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Your .csv file has to be in a 'lookups' directory in either the parent or a child local directory - like /opt/splunk/etc/apps/search/lookups.  (I've only used .csv files - not sure .txt would work)&lt;/P&gt;

&lt;P&gt;In this case, dns.txt.csv is a single-column csv with hostname (being the column name, etc) as the first value and the domains to be searched as the subsequent lines.  The 'rename fields as search' means it'll return more than just 1:1 value matches - ex: blah.com will match when hostname=toad.blah.com &lt;EM&gt;and&lt;/EM&gt; when hostname=blah.com instead of just the latter.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2012 18:00:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47264#M11282</guid>
      <dc:creator>rgonzale6</dc:creator>
      <dc:date>2012-05-09T18:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to search using a list as input?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47265#M11283</link>
      <description>&lt;P&gt;I think this is similar to what you are trying to do and should help get you there.  Your file would look like this with dns_name or whatever you call it as the header.&lt;/P&gt;

&lt;P&gt;dns_name&lt;BR /&gt;
blah.com&lt;BR /&gt;
lol.com&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/2457/inputlookup-against-a-list-of-bad-domains"&gt;http://splunk-base.splunk.com/answers/2457/inputlookup-against-a-list-of-bad-domains&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2012 18:00:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-using-a-list-as-input/m-p/47265#M11283</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2012-05-09T18:00:55Z</dc:date>
    </item>
  </channel>
</rss>

