<?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 edit my inputlookup search to filter based on time difference? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224737#M43983</link>
    <description>&lt;P&gt;Yea, that's my current work around since it appears you only can do a very limited set of operations within the |inputlookup framework.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2016 21:53:04 GMT</pubDate>
    <dc:creator>goodsellt</dc:creator>
    <dc:date>2016-11-14T21:53:04Z</dc:date>
    <item>
      <title>How to edit my inputlookup search to filter based on time difference?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224734#M43980</link>
      <description>&lt;P&gt;I'm attempting to filter my inputlookup command based on the amount of time that has passed between "now" (when the job is run) and a field in the table which is a integer representation of the epoch time. &lt;/P&gt;

&lt;P&gt;I'm attempting to do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup my_kvstore where 2700&amp;lt;=now()-Last_PA_Send
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I'm getting the error: &lt;CODE&gt;Error in 'SearchOperator:inputcsv': The ‘2700&amp;lt;=now()-Last_PA_Send’ filter could not be verified. It may contain invalid operators, or could not be optimized for search results.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Any ideas how I could get a filter like this to work correctly and still utilize the performance benefits of a inputlookup filter?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 16:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224734#M43980</guid>
      <dc:creator>goodsellt</dc:creator>
      <dc:date>2016-11-09T16:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my inputlookup search to filter based on time difference?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224735#M43981</link>
      <description>&lt;P&gt;Note, I do know that this will work as intended by doing:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup my_kvstore | where 2700&amp;lt;now()-Last_PA_Send
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Though I'm lead to believe there will be a performance impact once the size of the KV store grows arbitrarily large.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 20:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224735#M43981</guid>
      <dc:creator>goodsellt</dc:creator>
      <dc:date>2016-11-09T20:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my inputlookup search to filter based on time difference?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224736#M43982</link>
      <description>&lt;P&gt;Have you tried something like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup my_kvstore | eval myTime=now()-Last_PA_Send | where myTime&amp;lt;=2700
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;stuffing the difference result into a new field might get you around that filter parsing issue.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 20:53:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224736#M43982</guid>
      <dc:creator>pgreer_splunk</dc:creator>
      <dc:date>2016-11-14T20:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my inputlookup search to filter based on time difference?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224737#M43983</link>
      <description>&lt;P&gt;Yea, that's my current work around since it appears you only can do a very limited set of operations within the |inputlookup framework.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2016 21:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224737#M43983</guid>
      <dc:creator>goodsellt</dc:creator>
      <dc:date>2016-11-14T21:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my inputlookup search to filter based on time difference?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224738#M43984</link>
      <description>&lt;P&gt;Either of these two are the workaround, unfortunately you cannot use anything other than a limited set of operations for the where clause at the inputlookup level:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup my_kvstore | where 2700&amp;lt;now()-Last_PA_Send

|inputlookup my_kvstore | eval myTime=now()-Last_PA_Send | where myTime&amp;lt;=2700
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Nov 2016 21:55:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224738#M43984</guid>
      <dc:creator>goodsellt</dc:creator>
      <dc:date>2016-11-14T21:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my inputlookup search to filter based on time difference?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224739#M43985</link>
      <description>&lt;P&gt;What about creating a subsearch that generates the constraints for the &lt;CODE&gt;WHERE&lt;/CODE&gt; clause of the &lt;CODE&gt;inputlookup&lt;/CODE&gt; command. Your requirement &lt;CODE&gt;2700&amp;lt;=now()-Last_PA_Send&lt;/CODE&gt; is equivalent to &lt;CODE&gt;Last_PA_Send&amp;lt;=now()-2700&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| inputlookup my_kvstore WHERE [| makeresults count=1| eval max_delta=now()-2700 | eval search="(Last_PA_send&amp;lt;=" . max_delta . ")" | table search ]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 May 2020 15:20:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-edit-my-inputlookup-search-to-filter-based-on-time/m-p/224739#M43985</guid>
      <dc:creator>dnitschke_splun</dc:creator>
      <dc:date>2020-05-02T15:20:15Z</dc:date>
    </item>
  </channel>
</rss>

