<?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: CSV and InputLookup in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84871#M17656</link>
    <description>&lt;P&gt;That doesn't sound right, unless you have things in Websites.CSV that will match everything. You can check the resulting search string by running a variant of the subsearch on its own and adding &lt;CODE&gt;| format&lt;/CODE&gt; at the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Websites.CSV | rename Websites as query | format
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the filter that the main search will use. If it includes terms that will function as catch-all filters, then there's your problem.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2013 16:11:38 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-01-11T16:11:38Z</dc:date>
    <item>
      <title>CSV and InputLookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84868#M17653</link>
      <description>&lt;P&gt;Ok,&lt;/P&gt;

&lt;P&gt;I am sure there is something here about this already, but I have looked for it and just can not seem to find it.&lt;/P&gt;

&lt;P&gt;I am looking to run a search on a csv file that is populated with web addresses and IP Addresses to see if any we have hit in of these sites. I have the CSV file set in UTF-8 coding and looks like this:&lt;/P&gt;

&lt;P&gt;Websites&lt;BR /&gt;
"&lt;A href="Http://www.google.com" target="_blank"&gt;Http://www.google.com&lt;/A&gt;"&lt;BR /&gt;
"&lt;A href="Http://www.yahoo.com" target="_blank"&gt;Http://www.yahoo.com&lt;/A&gt;"&lt;BR /&gt;
"10.1.1.1"&lt;/P&gt;

&lt;P&gt;Now I want to compare this to a sourtype called Gateway and have tried to following search and can't seem to get any results (even though I search for the website without the inputlookup command and it is triggered)&lt;/P&gt;

&lt;P&gt;sourcetype=gateway | inlookup Websites.CSV | stats sparkline count values(src_ip) as src_ip by domain&lt;/P&gt;

&lt;P&gt;Any help would be appericiated! Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:05:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84868#M17653</guid>
      <dc:creator>SamHarris</dc:creator>
      <dc:date>2020-09-28T13:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: CSV and InputLookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84869#M17654</link>
      <description>&lt;P&gt;inputlookup needs to be the first command in a search. While you won't get a syntax error in other cases, it won't make sense to use it then.&lt;/P&gt;

&lt;P&gt;If I understand your need correctly, you have data with sourcetype "Gateway" and in this data you want to look for strings that come from the csv file Websites.CSV. You can do this with a subsearch. Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=gateway [| inputlookup Websites.CSV | return $Websites] | stats sparkline count values(src_ip) as src_ip by domain
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will have the effect that the original search looks something like this after the subsearch is done:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=gateway ("Http://www.google.com" OR "Http://www.yahoo.com" OR "10.1.1.1") | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jan 2013 15:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84869#M17654</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-01-11T15:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: CSV and InputLookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84870#M17655</link>
      <description>&lt;P&gt;Think I still might not be getting it... &lt;/P&gt;

&lt;P&gt;When I run your command into our search I get populated with EVERYTHING everyone hits within the last 15 minutes. I only would like to see the websites and IPs that we hit within the CSV, but I will also not rule out that my CSV and lookup fields are incorrect as well.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 16:07:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84870#M17655</guid>
      <dc:creator>SamHarris</dc:creator>
      <dc:date>2013-01-11T16:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: CSV and InputLookup</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84871#M17656</link>
      <description>&lt;P&gt;That doesn't sound right, unless you have things in Websites.CSV that will match everything. You can check the resulting search string by running a variant of the subsearch on its own and adding &lt;CODE&gt;| format&lt;/CODE&gt; at the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Websites.CSV | rename Websites as query | format
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the filter that the main search will use. If it includes terms that will function as catch-all filters, then there's your problem.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 16:11:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-and-InputLookup/m-p/84871#M17656</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-01-11T16:11:38Z</dc:date>
    </item>
  </channel>
</rss>

