<?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 Limit timechart from lookup table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Limit-timechart-from-lookup-table/m-p/571107#M199014</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm using a lookup table with a _time field to create a timechart which works great.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the lookup table has data for say 90 days and I don't always want the timechart to be for the full 90 days.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I limit my timechart to 30 days from my lookup table that has 90 days worth of data without deleting the extra 60 days?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The _time field is in already in the format %y-%m-%d %H:%M&lt;BR /&gt;&lt;BR /&gt;I've tried&amp;nbsp;&lt;BR /&gt;|inputlookup mylookupfile where earliest=-30d&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 15 Oct 2021 13:46:32 GMT</pubDate>
    <dc:creator>humanBeing</dc:creator>
    <dc:date>2021-10-15T13:46:32Z</dc:date>
    <item>
      <title>Limit timechart from lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-timechart-from-lookup-table/m-p/571107#M199014</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm using a lookup table with a _time field to create a timechart which works great.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the lookup table has data for say 90 days and I don't always want the timechart to be for the full 90 days.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I limit my timechart to 30 days from my lookup table that has 90 days worth of data without deleting the extra 60 days?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The _time field is in already in the format %y-%m-%d %H:%M&lt;BR /&gt;&lt;BR /&gt;I've tried&amp;nbsp;&lt;BR /&gt;|inputlookup mylookupfile where earliest=-30d&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 13:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-timechart-from-lookup-table/m-p/571107#M199014</guid>
      <dc:creator>humanBeing</dc:creator>
      <dc:date>2021-10-15T13:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Limit timechart from lookup table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Limit-timechart-from-lookup-table/m-p/571123#M199022</link>
      <description>&lt;P&gt;The queries allowed in the &lt;FONT face="courier new,courier"&gt;where&lt;/FONT&gt; clause of &lt;FONT face="courier new,courier"&gt;inputlookup&lt;/FONT&gt; are different from those allowed in the &lt;FONT face="courier new,courier"&gt;search&lt;/FONT&gt; command.&amp;nbsp; In particular, "earliest" in &lt;FONT face="courier new,courier"&gt;search&lt;/FONT&gt; maps to the _time field whereas in &lt;FONT face="courier new,courier"&gt;inputlookup&lt;/FONT&gt; it refers to the "earliest" field.&lt;/P&gt;&lt;P&gt;A further complication is &lt;FONT face="courier new,courier"&gt;inputlookup where&lt;/FONT&gt; does not recognize time modifiers.&lt;/P&gt;&lt;P&gt;One workaround is to read the entire lookup, convert _time to epoch form, then compare the converted time to the timestamp 30 days old.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlokoup mylookup
| eval eTime=strptime(_time, "%Y-%m-%d %H:%%M")
| where eTime &amp;gt; relative_time(now(), "-30d")
| fields - eTime&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 15 Oct 2021 14:54:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Limit-timechart-from-lookup-table/m-p/571123#M199022</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-15T14:54:54Z</dc:date>
    </item>
  </channel>
</rss>

