<?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 search when an event was indexed? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168493#M48051</link>
    <description>&lt;P&gt;To quickly get a general overview of your indexing delay, consider something &lt;CODE&gt;tstats&lt;/CODE&gt;y like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_indextime) as max where index=foo by host _time span=1s
| eval delta = max - _time | timechart max(delta) by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 May 2015 21:06:38 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2015-05-13T21:06:38Z</dc:date>
    <item>
      <title>How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168489#M48047</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is there a way to tell when an event is actually indexed?  I have a customer who is saying events are showing up with the proper timestamps, but 2 days late.  So, I need a way to show when the event was indexed on the system. &lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 11:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168489#M48047</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-04-29T11:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168490#M48048</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;You can use the internal field _indextime to get what you need&lt;/P&gt;

&lt;P&gt;To make it simplier you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search... | eval _time = _indextime | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2015 11:31:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168490#M48048</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2015-04-29T11:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168491#M48049</link>
      <description>&lt;P&gt;Thanks.  How would I test if the index time is behind the timestamp in the logfile?  &lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2015 18:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168491#M48049</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-05-13T18:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168492#M48050</link>
      <description>&lt;P&gt;Do a chart showing both values to see where they might be off or if there is some pattern. Start with something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* | timechart span=1s values(_indextime) AS indextime, values(_time) AS time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Set the Chart Overlay to be _indextime and Yes show it as an axis to see how they graph out. The table itself is telling as it will show you that there will be slight discrepancies in most data by fractions of a second. However, in your case, it may help you see a pattern.&lt;/P&gt;

&lt;P&gt;You could further refine the visual display by using convert() to change the time displays or evals to find the differences between the two values and then chart that. For example, do the following and show as column or bar chart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* | eval timespan=_indextime-_time | timechart span=1s values(timespan) AS timespan
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 May 2015 20:14:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168492#M48050</guid>
      <dc:creator>jtrucks</dc:creator>
      <dc:date>2015-05-13T20:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168493#M48051</link>
      <description>&lt;P&gt;To quickly get a general overview of your indexing delay, consider something &lt;CODE&gt;tstats&lt;/CODE&gt;y like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats max(_indextime) as max where index=foo by host _time span=1s
| eval delta = max - _time | timechart max(delta) by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 May 2015 21:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168493#M48051</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-05-13T21:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168494#M48052</link>
      <description>&lt;P&gt;Just Comapare both times and get the difference.&lt;/P&gt;

&lt;P&gt;..|eval diff=_indextime-_time|table _indextime,_time,diff&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:00:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168494#M48052</guid>
      <dc:creator>Arun_N_007</dc:creator>
      <dc:date>2020-09-28T20:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168495#M48053</link>
      <description>&lt;P&gt;Since I keep pointing people back at this comment all the time, might as well drop in a new-and-improved version:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count min(_indextime) as min, avg(_indextime) as avg, max(_indextime) as max where index=foo by _time span=1s 
| foreach min avg max 
    [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; - _time] 
| bin span=30m _time as tmp
| eventstats sum(count) as sum by tmp
| eval avg = count * avg / sum
| timechart span=30m min(min) as min sum(avg) as avg max(max) as max
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will not only get you an upper bound for indexing delay, but also a lower bound "events from the future" and a statistically accurate average &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 19:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168495#M48053</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-10-19T19:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to search when an event was indexed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168496#M48054</link>
      <description>&lt;P&gt;Give &lt;CODE&gt;Meta Woot!&lt;/CODE&gt; a try:&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/2949/"&gt;https://splunkbase.splunk.com/app/2949/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;We talk about this kind of thing in our talk from .conf18:&lt;BR /&gt;
&lt;A href="https://conf.splunk.com/files/2018/recordings/10-must-have-apps-fn1072.mp4"&gt;https://conf.splunk.com/files/2018/recordings/10-must-have-apps-fn1072.mp4&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 21:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-when-an-event-was-indexed/m-p/168496#M48054</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-10-19T21:37:02Z</dc:date>
    </item>
  </channel>
</rss>

