<?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 do I search for events within _indextime? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416324#M167066</link>
    <description>&lt;P&gt;Even though _indextime is a hidden field it can be used.  The search provided does not work.  Regardless, if the eval did work, I think it would perform the same way and not do what I need it to do, which is to ONLY show me results for events that were INDEXED within the time I have specified.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Oct 2018 17:15:21 GMT</pubDate>
    <dc:creator>mcbradfordwcb</dc:creator>
    <dc:date>2018-10-12T17:15:21Z</dc:date>
    <item>
      <title>How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416322#M167064</link>
      <description>&lt;P&gt;I understand the behavior of Splunk when using _indextime, but I want to know what query would do what I really am looking for.&lt;/P&gt;

&lt;P&gt;In the sample query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="bro"  _indextime &amp;gt; 1539343843 _indextime &amp;lt;= 1539343963
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And with the timepicker set to last 24 hours, Splunk will actually look for events indexed between the time specified and _time within the last 24 hours.&lt;/P&gt;

&lt;P&gt;I do not want Splunk to search _time, I only want it to search for events within _indextime&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 13:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416322#M167064</guid>
      <dc:creator>mcbradfordwcb</dc:creator>
      <dc:date>2018-10-12T13:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416323#M167065</link>
      <description>&lt;P&gt;@mcbradfordwcb&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;_indextime&lt;/CODE&gt;  is hidden field. So you can not use directly.&lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index="bro" | eval T=_indextime |where T &amp;gt; 1539343843 AND T &amp;lt;= 1539343963
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Oct 2018 15:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416323#M167065</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-12T15:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416324#M167066</link>
      <description>&lt;P&gt;Even though _indextime is a hidden field it can be used.  The search provided does not work.  Regardless, if the eval did work, I think it would perform the same way and not do what I need it to do, which is to ONLY show me results for events that were INDEXED within the time I have specified.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 17:15:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416324#M167066</guid>
      <dc:creator>mcbradfordwcb</dc:creator>
      <dc:date>2018-10-12T17:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416325#M167067</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/92541"&gt;@mcbradfordwcb&lt;/a&gt; &lt;BR /&gt;
you can use time modifiers for index time like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;indexname&amp;gt; _index_earliest=-h@h _index_latest=@h
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similar to earliest and latest for _time, _index_earliest and _index_latest are available for _indextime.&lt;BR /&gt;
refer this blog- &lt;A href="https://www.splunk.com/blog/2013/09/26/an-introduction-to-the-theory-or-relative-time-modifiers-for-indextime.html" target="_blank"&gt;https://www.splunk.com/blog/2013/09/26/an-introduction-to-the-theory-or-relative-time-modifiers-for-indextime.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416325#M167067</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-09-29T21:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416326#M167068</link>
      <description>&lt;LI-CODE lang="markup"&gt;index="bro" _index_earliest &amp;gt; 1539343843 _index_latest &amp;lt;= 1539343963&lt;/LI-CODE&gt;
&lt;P&gt;Does not work. It looks like Splunk is treating these as actual terms to search.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 15:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416326#M167068</guid>
      <dc:creator>mcbradfordwcb</dc:creator>
      <dc:date>2023-10-12T15:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416327#M167069</link>
      <description>&lt;P&gt;@mcbradfordwcb,&lt;BR /&gt;
it is working please check for ex:-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal _index_earliest&amp;gt;1539343843 _index_latest&amp;lt;=1539343963
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 13 Oct 2018 05:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416327#M167069</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-10-13T05:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416328#M167070</link>
      <description>&lt;P&gt;I would run with the following :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="bro" earliest=0 latest=now()  _indextime &amp;gt; 1539343843 _indextime &amp;lt;= 1539343963
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Since the time picker cannot be configured to run against a different field you have to search all of time and then filter based on the _indextime you want to see, sadly it is not fast if your index is big.&lt;/P&gt;

&lt;P&gt;_index_earliest and _index_latest do work but since you don't really see the index time it becomes difficult to validate your search results are accurate. This is what I normally do to see that :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt; | eval _time=_indextime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will cause your event timeline to show the events by _indextime so that you can validate the results easier.&lt;/P&gt;

&lt;P&gt;My index has lots of overlapping equivalent timestamps and I need to pull the latest values by _indextime so I often end up doing this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;search&amp;gt; | eval orig_time=_time,_time=_indextime | stats latest(stuff) | eval _time=orig_time | timechart &amp;lt;stuff&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not sure exactly what your data looks like but that helps me get the latest indexed values regardless of the _time of the event (slow... but it works).&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416328#M167070</guid>
      <dc:creator>corey_reynders</dc:creator>
      <dc:date>2020-09-29T22:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for events within _indextime?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416329#M167071</link>
      <description>&lt;P&gt;here is a decent debate and some tips around _indextime&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/678655/how-to-trigger-alerts-when-indextime-time-1.html"&gt;https://answers.splunk.com/answers/678655/how-to-trigger-alerts-when-indextime-time-1.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 00:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-search-for-events-within-indextime/m-p/416329#M167071</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2018-12-07T00:04:25Z</dc:date>
    </item>
  </channel>
</rss>

