<?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: timechart start at certain time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-start-at-certain-time/m-p/300605#M90490</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;source="/tmp/getsysgfiles/server_cpu.g" | eval _time=strptime(Time,"%Y/%m/%d/%H/%M") | addinfo | where _time&amp;gt;=info_min_time and _time&amp;lt;info_max_time | timechart sum(two) span=1m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I removed your &lt;CODE&gt;rex&lt;/CODE&gt; command, as it didn't seem to be extracting a field anyway.&lt;/P&gt;

&lt;P&gt;But, really, you should work at getting the timestamp correct at index time.  Is there a reason the timestamp you want to use here differs from the event time Splunk has for the event?&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2018 17:16:56 GMT</pubDate>
    <dc:creator>micahkemp</dc:creator>
    <dc:date>2018-01-10T17:16:56Z</dc:date>
    <item>
      <title>timechart start at certain time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-start-at-certain-time/m-p/300604#M90489</link>
      <description>&lt;P&gt;I have data similiar to the following - this is just a subset as the full data file contains 4 days worth of data.  The data was imported as a one shot deal all at once.&lt;/P&gt;

&lt;P&gt;2018/1/3/12/34/10 2 1 6.00&lt;BR /&gt;
2018/1/3/12/35/10 2 1 6.00&lt;BR /&gt;
2018/1/3/12/36/10 2 1 6.00&lt;BR /&gt;
2018/1/3/12/37/10 3 1 7.00&lt;BR /&gt;
2018/1/3/12/38/10 3 1 7.00&lt;BR /&gt;
2018/1/3/12/39/10 2 1 6.00&lt;BR /&gt;
2018/1/3/12/40/10 3 1 7.00&lt;/P&gt;

&lt;P&gt;To graph the data, we use the following command.&lt;/P&gt;

&lt;P&gt;source="/tmp/getsysgfiles/server_cpu.g" | rex "(?\d+\/\d+\/\d+\/\d+\/\d+\/\d+) (?\d+) (?\d+)" | eval _time=strptime(Time,"%Y/%m/%d/%H/%M") | timechart sum(two) span=1m&lt;/P&gt;

&lt;P&gt;The problem is that the graph shows all data.  For instance, is there a way to modify the command to only show entries from the past 24 hours?  If I use the time picker or the "earliest" command, it seems to be using the import time of the data, not the timestamp we converted in strptime.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 15:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-start-at-certain-time/m-p/300604#M90489</guid>
      <dc:creator>dmoulais</dc:creator>
      <dc:date>2018-01-10T15:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: timechart start at certain time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-start-at-certain-time/m-p/300605#M90490</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;source="/tmp/getsysgfiles/server_cpu.g" | eval _time=strptime(Time,"%Y/%m/%d/%H/%M") | addinfo | where _time&amp;gt;=info_min_time and _time&amp;lt;info_max_time | timechart sum(two) span=1m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I removed your &lt;CODE&gt;rex&lt;/CODE&gt; command, as it didn't seem to be extracting a field anyway.&lt;/P&gt;

&lt;P&gt;But, really, you should work at getting the timestamp correct at index time.  Is there a reason the timestamp you want to use here differs from the event time Splunk has for the event?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 17:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-start-at-certain-time/m-p/300605#M90490</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-10T17:16:56Z</dc:date>
    </item>
  </channel>
</rss>

