<?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 Time Picker(Time range) in &amp;quot;inputlookup&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417487#M120133</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookup
| addinfo
| where (&amp;lt;Your Time Field Name Here&amp;gt; &amp;gt;= info_min_time AND &amp;lt;Your Time Field Name Here&amp;gt; &amp;lt;= info_max_time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 30 Jul 2019 14:54:14 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-30T14:54:14Z</dc:date>
    <item>
      <title>How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417483#M120129</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
How to i must use time range &lt;CODE&gt;earliest=-24h@h latest=now()&lt;/CODE&gt; in search &lt;CODE&gt;| inputlookup lookup&lt;/CODE&gt;. I tried to do so &lt;CODE&gt;| inputlookup lookup | search earliest=-24h@h latest=now()&lt;/CODE&gt;, but this not worked.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 13:15:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417483#M120129</guid>
      <dc:creator>sbimizry</dc:creator>
      <dc:date>2019-07-30T13:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417484#M120130</link>
      <description>&lt;P&gt;Hi sbimizry,&lt;BR /&gt;
if you need to have _time, you should use a summary index not a lookup.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 13:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417484#M120130</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-07-30T13:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417485#M120131</link>
      <description>&lt;P&gt;Can I do without him? If 'yes', then how?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 14:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417485#M120131</guid>
      <dc:creator>sbimizry</dc:creator>
      <dc:date>2019-07-30T14:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417486#M120132</link>
      <description>&lt;P&gt;you should save in your lookup a timestamp in epochtime and then modify searches, but it isn't so easy.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 14:11:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417486#M120132</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-07-30T14:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417487#M120133</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookup
| addinfo
| where (&amp;lt;Your Time Field Name Here&amp;gt; &amp;gt;= info_min_time AND &amp;lt;Your Time Field Name Here&amp;gt; &amp;lt;= info_max_time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jul 2019 14:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417487#M120133</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-30T14:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417488#M120134</link>
      <description>&lt;P&gt;If you want to use earliest and latest mandatorily in your search, push your data to index. In setting -&amp;gt; Add Data -&amp;gt; Upload, select your CSV file. Now _time field value will be the same as timestamp value in your CSV file. After this, select an index or create a new index and add data and start searching.&lt;/P&gt;

&lt;P&gt;OR if you want to use inputlookup, use this code at the start of query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup &amp;lt;lookup name&amp;gt;.csv | eval summarydateformat=round(strptime(&amp;lt;time-field&amp;gt;,"%m/%d/%y"),0) | where (summarydateformat &amp;gt;="$time_tok1.earliest$" and summarydateformat &amp;lt;="$time_tok1.latest$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Replace time-field with the timestamp of your CSV file and time format accordingly. Add a date picker with token name as time_tok1. Add "$time_tok1.earliest$" and "$time_tok1.latest$" in your searches. But in this approach u will not be able to select "last 24 hr", "last 30 days" etc. U can only select To and From date from the date picker.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417488#M120134</guid>
      <dc:creator>jitendragupta</dc:creator>
      <dc:date>2020-09-30T01:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417489#M120135</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/197513"&gt;@sbimizry&lt;/a&gt; ,&lt;/P&gt;

&lt;P&gt;If you have not included a time value anywhere in your lookup, then you cannot do this.  Lookup files are basically state tables that the owner defines and updates.  This means that the owner also defines which fields to include in the lookup, which may or may not (most do not) have a field that references a time value.  Even if it &lt;EM&gt;DOES&lt;/EM&gt; reference a time value, it may not be the time value you are thinking of.  You would need some logic that executes when you update / create your lookup to add a time value that equates to the execution time of the creation / update of the lookup.  Once you have a time field, you can re-map it to the &lt;CODE&gt;_time&lt;/CODE&gt; field, which should allow you to use &lt;CODE&gt;search earliest=-24h@h&lt;/CODE&gt; (you don't need latest=now(), Splunk assumes that if you don't provide a &lt;CODE&gt;latest=&lt;/CODE&gt; statement).&lt;/P&gt;

&lt;P&gt;If you &lt;EM&gt;HAVE&lt;/EM&gt; included a time field in your lookup then you can also use &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt; 's solution above:&lt;BR /&gt;
&lt;PRE&gt; | inputlookup lookup&lt;BR /&gt;
 | addinfo&lt;BR /&gt;
 | where ( &amp;gt;= info_min_time AND  &amp;lt;= info_max_time)&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;I hope this information provides you with your answer.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:34:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417489#M120135</guid>
      <dc:creator>jnudell_2</dc:creator>
      <dc:date>2020-09-30T01:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417490#M120136</link>
      <description>&lt;P&gt;We faced an issue with this solution : We need to filter a big time based KVSTore (several millions of lines)&lt;BR /&gt;
Doing the &lt;CODE&gt;addinfo&lt;/CODE&gt;/&lt;CODE&gt;where&lt;/CODE&gt; routes was not a success as it loads everything via the &lt;CODE&gt;inputlookup&lt;/CODE&gt; then filtering.&lt;/P&gt;

&lt;P&gt;The solution we've found is has below :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup lookup where 
[| makeresults 
| addinfo 
| table info_min_time 
| format "" "" "" "" "" "" 
| rex field=search "\"(?&amp;lt;search&amp;gt;[^\"]+)\"" ] AND _time&amp;lt;= 
[| makeresults 
| addinfo 
| table info_max_time 
| eval info_max_time=if(info_max_time="+Infinity",2999999999,info_max_time)
| format "" "" "" "" "" "" 
| rex field=search "\"(?&amp;lt;search&amp;gt;[^\"]+)\""]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There may be an easier way to use the format but i'm not every good with this command &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 17:31:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/417490#M120136</guid>
      <dc:creator>vgtk4431</dc:creator>
      <dc:date>2019-11-20T17:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/522753#M147425</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;&amp;nbsp;approach worked. thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 21:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/522753#M147425</guid>
      <dc:creator>splunksan</dc:creator>
      <dc:date>2020-10-02T21:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/561031#M159461</link>
      <description>&lt;P&gt;This is super useful, so I made a macro out of it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[filter_lookup_time(1)]
args = TIME_FIELD
definition =  ($TIME_FIELD$ &amp;gt;= [ makeresults \
    | addinfo  \
    | return $info_min_time \
] $TIME_FIELD$ &amp;lt;= [makeresults \
    | addinfo  \
    |  eval max_time=if(typeof(info_max_time) == "Number",info_max_time,2147483647) \
    | return $max_time]) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You use it like this (assumes "my_lookup" has a&amp;nbsp; "ts"&amp;nbsp; field in epoch format):&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;|inputlookup my_lookup where `filter_lookup_time(ts)`​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 14:14:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/561031#M159461</guid>
      <dc:creator>anm_mporter</dc:creator>
      <dc:date>2021-07-27T14:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/655176#M226332</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/186296"&gt;@jnudell_2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Can you please help with "&lt;SPAN&gt;You would need some logic that executes when you update / create your lookup to add a time value that equates to the execution time of the creation / update of the lookup.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;We have similar requirement, where we need to capture the 'time' when 'SUBMIT' button is clicked on a dashboard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 13:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/655176#M226332</guid>
      <dc:creator>Kiran_Gowda</dc:creator>
      <dc:date>2023-08-22T13:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Time Picker(Time range) in "inputlookup"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/655208#M226342</link>
      <description>&lt;P&gt;The submit button doesn't generate an event you can subscribe to. Each element has its own change monitoring via the &amp;lt;change&amp;gt; tag. The Submit button just triggers change actions for any inputs that have changed and are not already set to "search on change"&lt;/P&gt;&lt;P&gt;You could create search that runs whenever ANY of the form tokens change that sets a new token with the last change time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;
            | makeresults
            | eval last_update_ts=now()
            ```$TOKEN1$ $TOKEN2$ $TOKEN3$ $TOKEN4$```
          &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;set token="last_update_ts"&amp;gt;$result.last_update_ts$&amp;lt;/set&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;That same search COULD actually output to your lookup table using "last_update_ts" as the time field&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 17:39:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-Time-Picker-Time-range-in-quot-inputlookup-quot/m-p/655208#M226342</guid>
      <dc:creator>anm_mporter</dc:creator>
      <dc:date>2023-08-22T17:39:52Z</dc:date>
    </item>
  </channel>
</rss>

