<?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 CSV Searches in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Searches/m-p/364834#M66457</link>
    <description>&lt;P&gt;Hello everyone. I've been reading and reading and I can not get consistent results from anything I have tried. So hopefully someone can help me get this straight. I have a csv as follows:&lt;/P&gt;

&lt;P&gt;Indicator Type, Indicator, Description&lt;BR /&gt;
domain, google.com, stuff&lt;BR /&gt;
hash, asdfasdfdf4a6sd54fa6sd4fa6sd4f6sd, stuff&lt;BR /&gt;
file, test.exe, stuff&lt;/P&gt;

&lt;P&gt;I am trying to conduct a search that uses the Indicator column to search for ANY instances of the indicator. For example, it should return not just google.com, but also mail.google.com, or google.com.net. Additionally, I want to search the entire log, not just a specific field for that value. Here is what kinda works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | lookup NamedDefinition Indicator as logField OUTPUT Indicator as IOC | search IOC=* | stats count by IOC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That last part doesn't really matter, so it can be fields or whatever. This command works SOMETIMES. Sometimes I get errors that the lookup doesn't exist.&lt;/P&gt;

&lt;P&gt;However, when it does work, this only searches one field in a log for something that matches in the csv EXACTLY. I tried putting a wildcard in the value (i.e. *google.com) but did not work. I also do not have access to modify any configuration files. I have also seen this command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex [|inputlookup NamedDefinition.csv | fields Indicator]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but that has never returned any results. I know there are results (I use google.com as a control domain as well). Any help would be extremely appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 15:39:49 GMT</pubDate>
    <dc:creator>rlamezquita</dc:creator>
    <dc:date>2017-10-03T15:39:49Z</dc:date>
    <item>
      <title>CSV Searches</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Searches/m-p/364834#M66457</link>
      <description>&lt;P&gt;Hello everyone. I've been reading and reading and I can not get consistent results from anything I have tried. So hopefully someone can help me get this straight. I have a csv as follows:&lt;/P&gt;

&lt;P&gt;Indicator Type, Indicator, Description&lt;BR /&gt;
domain, google.com, stuff&lt;BR /&gt;
hash, asdfasdfdf4a6sd54fa6sd4fa6sd4f6sd, stuff&lt;BR /&gt;
file, test.exe, stuff&lt;/P&gt;

&lt;P&gt;I am trying to conduct a search that uses the Indicator column to search for ANY instances of the indicator. For example, it should return not just google.com, but also mail.google.com, or google.com.net. Additionally, I want to search the entire log, not just a specific field for that value. Here is what kinda works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | lookup NamedDefinition Indicator as logField OUTPUT Indicator as IOC | search IOC=* | stats count by IOC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That last part doesn't really matter, so it can be fields or whatever. This command works SOMETIMES. Sometimes I get errors that the lookup doesn't exist.&lt;/P&gt;

&lt;P&gt;However, when it does work, this only searches one field in a log for something that matches in the csv EXACTLY. I tried putting a wildcard in the value (i.e. *google.com) but did not work. I also do not have access to modify any configuration files. I have also seen this command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex [|inputlookup NamedDefinition.csv | fields Indicator]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but that has never returned any results. I know there are results (I use google.com as a control domain as well). Any help would be extremely appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 15:39:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-Searches/m-p/364834#M66457</guid>
      <dc:creator>rlamezquita</dc:creator>
      <dc:date>2017-10-03T15:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Searches</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-Searches/m-p/364835#M66458</link>
      <description>&lt;P&gt;Try this ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex 
[| inputlookup NamedDefinition.csv  | table Indicator  | format "(" "" "" "" "OR" ")"  | rex mode=sed field=search "s/Indicator=//g"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To see what is coming out of the subsearch, and adjust it, run this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup NamedDefinition.csv  
| table Indicator  
| format "(" "" "" "" "OR" ")"  
| rex mode=sed field=search "s/Indicator=//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Oct 2017 16:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-Searches/m-p/364835#M66458</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-03T16:18:37Z</dc:date>
    </item>
  </channel>
</rss>

