<?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 How to create a timechart based on index time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427408#M122376</link>
    <description>&lt;P&gt;I'm trying to create a timechart to show when logs were ingested.  Trying to use _indextime but it doesn't seem to be working.  What am I missing on my SPL?&lt;/P&gt;

&lt;P&gt;Current query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=web
| eval _time=strptime(_indextime, "%d-%b-%y %H:%M:%S") 
| timechart span=1h count by index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 27 Aug 2018 14:20:44 GMT</pubDate>
    <dc:creator>DEAD_BEEF</dc:creator>
    <dc:date>2018-08-27T14:20:44Z</dc:date>
    <item>
      <title>How to create a timechart based on index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427408#M122376</link>
      <description>&lt;P&gt;I'm trying to create a timechart to show when logs were ingested.  Trying to use _indextime but it doesn't seem to be working.  What am I missing on my SPL?&lt;/P&gt;

&lt;P&gt;Current query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=web
| eval _time=strptime(_indextime, "%d-%b-%y %H:%M:%S") 
| timechart span=1h count by index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Aug 2018 14:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427408#M122376</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-08-27T14:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart based on index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427409#M122377</link>
      <description>&lt;P&gt;You shouldn't be putting a formatted string timestamp into _time. Splunk expects an epoch timestamp there (even though it usually presents _time automatically as a human readable string). So just try &lt;CODE&gt;eval _time = _indextime&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 14:29:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427409#M122377</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-08-27T14:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart based on index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427410#M122378</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;strftime&lt;/CODE&gt; instead&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=web
 | eval indextime=strftime(_indextime, "%d-%b-%y %H:%M:%S") 
 | timechart span=1h max(indextime) by index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you wanted to identify indexing lag, you can do this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index=web
   | eval indextime=strftime(_indextime, "%s") 
   | eval diff=indextime-_time
   | timechart span=1h max(diff) AS diff
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Aug 2018 15:01:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427410#M122378</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-08-27T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a timechart based on index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427411#M122379</link>
      <description>&lt;P&gt;&lt;CODE&gt;_indextime&lt;/CODE&gt; is already in epoch.  No conversion is needed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval  _time = _indextime  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Aug 2018 15:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-timechart-based-on-index-time/m-p/427411#M122379</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-27T15:10:48Z</dc:date>
    </item>
  </channel>
</rss>

