<?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 use a lookup table in a search to match any IPs or domains found in a column, but ignore any values older than 90 days? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182130#M52511</link>
    <description>&lt;P&gt;If you just want to do a text search of IP from the lookup into your index, try something like this (assuming your data format of lookup table is &lt;CODE&gt;%Y-%m-%d&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype=* [| inputlookup ioc.csv  | where  strptime(date,"%y-%m-%d")&amp;gt;relative_time(now()-"-90d")| eval search=ioc | table search ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you just want to a field matching (like value of src_ip) of the IP from lookup table, try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=* sourcetype=* [| inputlookup ioc.csv  | where  strptime(date,"%y-%m-%d")&amp;gt;relative_time(now()-"-90d")| eval src_ip=ioc | table src_ip ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 20 Aug 2015 18:13:53 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2015-08-20T18:13:53Z</dc:date>
    <item>
      <title>How to use a lookup table in a search to match any IPs or domains found in a column, but ignore any values older than 90 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182127#M52508</link>
      <description>&lt;P&gt;I currently have a lookup table that contains 2 columns: date and ioc. The goal is to have Splunk go through the lookup table and match any IPs or domains it finds on the ioc column.  However, I would like Splunk to disregard ioc's have been on the lookup table for 90 days or more.  Any help would be great.  Below is what I have so far not much &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype=* [| inputlookup ioc.csv  | fields + ioc]|
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182127#M52508</guid>
      <dc:creator>ehaile</dc:creator>
      <dc:date>2015-08-20T16:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a search to match any IPs or domains found in a column, but ignore any values older than 90 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182128#M52509</link>
      <description>&lt;P&gt;To your search string add this after removing the last pipe&lt;/P&gt;

&lt;HR /&gt;

&lt;H2&gt; NOT  [  | inputlookup ioc.csv  | date&amp;gt;"&amp;lt;90days&amp;gt;"|fields + ioc] &lt;/H2&gt;

&lt;P&gt;The &amp;lt;90days&amp;gt; should be in the format of how your date is in your CSV.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 17:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182128#M52509</guid>
      <dc:creator>jensonthottian</dc:creator>
      <dc:date>2015-08-20T17:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a search to match any IPs or domains found in a column, but ignore any values older than 90 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182129#M52510</link>
      <description>&lt;P&gt;jensonthottian,&lt;/P&gt;

&lt;P&gt;The query keeps failing I get the following error message "Error in inputlookup command:Invalid argument: 'date&amp;gt;'.&lt;/P&gt;

&lt;P&gt;Below is what I tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype=* [| inputlookup ioc2.csv | fields + ioc] NOT [|inputlookup ioc2.csv date&amp;gt; "08/19/2015" fields +ioc]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2015 18:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182129#M52510</guid>
      <dc:creator>ehaile</dc:creator>
      <dc:date>2015-08-20T18:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a search to match any IPs or domains found in a column, but ignore any values older than 90 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182130#M52511</link>
      <description>&lt;P&gt;If you just want to do a text search of IP from the lookup into your index, try something like this (assuming your data format of lookup table is &lt;CODE&gt;%Y-%m-%d&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype=* [| inputlookup ioc.csv  | where  strptime(date,"%y-%m-%d")&amp;gt;relative_time(now()-"-90d")| eval search=ioc | table search ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you just want to a field matching (like value of src_ip) of the IP from lookup table, try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=* sourcetype=* [| inputlookup ioc.csv  | where  strptime(date,"%y-%m-%d")&amp;gt;relative_time(now()-"-90d")| eval src_ip=ioc | table src_ip ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Aug 2015 18:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182130#M52511</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-20T18:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use a lookup table in a search to match any IPs or domains found in a column, but ignore any values older than 90 days?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182131#M52512</link>
      <description>&lt;P&gt;Thanks for the response.&lt;/P&gt;

&lt;P&gt;I am gettting the following:&lt;/P&gt;

&lt;P&gt;"Error in 'where' command:Typechecking failed. "-" only takes numbers."&lt;/P&gt;

&lt;P&gt;The data in the lookup is %Y-%m-%d&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2015 18:55:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-a-lookup-table-in-a-search-to-match-any-IPs-or/m-p/182131#M52512</guid>
      <dc:creator>ehaile</dc:creator>
      <dc:date>2015-08-20T18:55:40Z</dc:date>
    </item>
  </channel>
</rss>

