<?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: Why does using &amp;quot;timechart&amp;quot; result in missing values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223147#M65675</link>
    <description>&lt;P&gt;There is no event between  1/6/17 2:47:47.263 PM  and  1/6/17 3:02:45.401 PM  . So if you're running timechart with average on QUEUE_COUNT,  there's no value for QUEUE_COUNT in your events during the above time frame, hence it is showing no values. &lt;/P&gt;

&lt;P&gt;This could be the case every time you running the search that timechart misses some values due to missing data/events during a time frame. &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:19:20 GMT</pubDate>
    <dc:creator>nmohammed</dc:creator>
    <dc:date>2020-09-29T12:19:20Z</dc:date>
    <item>
      <title>Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223146#M65674</link>
      <description>&lt;P&gt;I have a search with a timechart command to fill a single value dashboard entry based on a count that comes from a DB2 query.   Sometimes when the timechart is run, the first or the last value is missing, which throws off the trend on the dashboard.  It seems to be intermittent and I haven't figured out how to fix it yet. Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;This is my search for the timechart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype="sql" source="UNDERWTG" QUEUE_COUNT | timechart  avg(QUEUE_COUNT) span=15m by source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the result I get:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                 UNDERWTG
2017-01-06 15:00:00  
2017-01-06 15:15:00 43.000000
2017-01-06 15:30:00 42.000000
2017-01-06 15:45:00 42.000000
2017-01-06 16:00:00 42.000000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is no data for the 15:00 timeframe.&lt;/P&gt;

&lt;P&gt;When I run the search without the timechart this is the data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1/6/17 4:02:45.588 PM   
2017-01-06 16:02:45 QUEUE_COUNT="42"
host = SNDSPKHVY001 source = UNDERWTG sourcetype = sql
1/6/17 3:47:47.427 PM   
2017-01-06 15:47:47 QUEUE_COUNT="42"
host = SNDSPKHVY001 source = UNDERWTG sourcetype = sql
1/6/17 3:32:45.373 PM   
2017-01-06 15:32:45 QUEUE_COUNT="42"
host = SNDSPKHVY001 source = UNDERWTG sourcetype = sql
1/6/17 3:17:45.409 PM   
2017-01-06 15:17:45 QUEUE_COUNT="43"
host = SNDSPKHVY001 source = UNDERWTG sourcetype = sql
1/6/17 3:02:45.401 PM   
2017-01-06 15:02:45 QUEUE_COUNT="43"
host = SNDSPKHVY001 source = UNDERWTG sourcetype = sql
1/6/17 2:47:47.263 PM   
2017-01-06 14:47:47 QUEUE_COUNT="43"
host = SNDSPKHVY001 source = UNDERWTG sourcetype = sql
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Jan 2017 21:11:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223146#M65674</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-06T21:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223147#M65675</link>
      <description>&lt;P&gt;There is no event between  1/6/17 2:47:47.263 PM  and  1/6/17 3:02:45.401 PM  . So if you're running timechart with average on QUEUE_COUNT,  there's no value for QUEUE_COUNT in your events during the above time frame, hence it is showing no values. &lt;/P&gt;

&lt;P&gt;This could be the case every time you running the search that timechart misses some values due to missing data/events during a time frame. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223147#M65675</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2020-09-29T12:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223148#M65676</link>
      <description>&lt;P&gt;Your events are arriving every 15 minutes if you do not want to miss a time-bucket you can set &lt;STRONG&gt;span=30m&lt;/STRONG&gt; instead of span=15m.&lt;BR /&gt;
Also if you already have fixed source to "UNDERWTG", there is no need to performs stats by source.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2017 23:05:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223148#M65676</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-01-06T23:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223149#M65677</link>
      <description>&lt;P&gt;A shot in the dark but can you please check if it is more related to the time chosen to produce data rather than the actual data. For example for below data try choosing earliest as &lt;CODE&gt;14:48:00&lt;/CODE&gt; and &lt;CODE&gt;latest&lt;/CODE&gt; as &lt;CODE&gt;16:03:00&lt;/CODE&gt;, then the first row will be blank as there is no data in the first time slot of &lt;CODE&gt;14:48:00 to 15:00:00&lt;/CODE&gt; as this grouping will land in of &lt;CODE&gt;14:45:00&lt;/CODE&gt; even though "visually" the data of &lt;CODE&gt;14:47:47 exists&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; 2017-01-06 16:02:45 QUEUE_COUNT="42"
 2017-01-06 15:47:47 QUEUE_COUNT="42"
 2017-01-06 15:32:45 QUEUE_COUNT="42"
 2017-01-06 15:17:45 QUEUE_COUNT="43"
 2017-01-06 15:02:45 QUEUE_COUNT="43"
 2017-01-06 14:47:47 QUEUE_COUNT="43"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Same might be the case why the ending data might be missing when latest time chosen is maybe few minutes before the grouping data.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jan 2017 04:29:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223149#M65677</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2017-01-07T04:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223150#M65678</link>
      <description>&lt;P&gt;Even if I change it to span=30m or span=60m I'm usually missing the first datapoint. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 12:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223150#M65678</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-09T12:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223151#M65679</link>
      <description>&lt;P&gt;the data is produced every 15 minutes so I'm not sure what you mean by missing data during a timeframe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:01:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223151#M65679</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-09T13:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223152#M65680</link>
      <description>&lt;P&gt;It's likely related to when the query is run but it's for a panel on a dashboard so I don't have a control over the when I just know it's often broken.    I guess I was hoping someone might know how to fix it. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223152#M65680</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-09T13:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223153#M65681</link>
      <description>&lt;P&gt;It looks like span=20m might be the fix I need.&lt;/P&gt;

&lt;P&gt;Also, thank you for pointing out the redundancy of grouping by source. &lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 20:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223153#M65681</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-10T20:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223154#M65682</link>
      <description>&lt;P&gt;I'm still having the issue with a 20m span. so that didn't fix it.  I apparently just had to wait for a specific time to run it. &lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 21:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223154#M65682</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-10T21:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223155#M65683</link>
      <description>&lt;P&gt;The input is produced approximately every fifteen minutes, but not precisely.  It's just after the quarter-hour, at plus-2 minutes and 45 to 47 seconds.  That means the time gap between events is sometimes as low as 14:57 minutes and sometimes as large as 15:03 minutes.&lt;/P&gt;

&lt;P&gt;Based on the data you posted, if you change your span to 20 minutes, there will always be at least one event in it, and sometime two.  If you change it to 30 minutes, there will usually be two, but sometimes one or three.  But that would be an odd way to show data that is basically every fifteen minutes.&lt;/P&gt;

&lt;P&gt;One reasonable option would be to "spread" the data forward or backward over the fifteen minute span.  In the following code, I take each record and copy it 5 minutes prior and 5 minutes later.  This way, you can use a 15 minute span, take the average, and you will always have at least two, and sometimes four, records being averaged.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=abc sourcetype="sql" source="UNDERWTG" QUEUE_COUNT 
| fields _time QUEUE_COUNT
| eval mytimes=mvappend(_time,relative_time(_time,"-5m"),relative_time(_time,"+5m"))
| mvexpand mytimes
| search mytimes &amp;lt; now()
| eval _time=mytimes
| timechart  avg(QUEUE_COUNT) span=15m
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in the middle, you will notice the search where I killed the one potential record that might have been future-time.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 22:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223155#M65683</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-01-10T22:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223156#M65684</link>
      <description>&lt;P&gt;I would check if the QUEUE_COUNT field values are properly recognized as numbers for avg calculations, so I would try this so see if it improves anything.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype="sql" source="UNDERWTG" QUEUE_COUNT=* | eval QUEUE_COUNT=coalesce(tonumber(QUEUE_COUNT),0) | timechart  avg(QUEUE_COUNT) span=15m by source
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2017 22:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223156#M65684</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-10T22:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223157#M65685</link>
      <description>&lt;P&gt;It's time dependent whether there is missing data or not. Sometimes its all there.  I've had no trouble with the averaging. &lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 12:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223157#M65685</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-11T12:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223158#M65686</link>
      <description>&lt;P&gt;that seems to work perfectly! thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 13:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223158#M65686</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2017-01-11T13:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223159#M65687</link>
      <description>&lt;P&gt;You are quite welcome!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 20:54:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/223159#M65687</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-01-13T20:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/585770#M204086</link>
      <description>&lt;P&gt;I was searching for something unrelated, and came across this old post. For what it's worth, I have the same issue with data ingested every 15 minutes, which is occasionally early or late, which creates missing or extra entries on my timecharts.&lt;/P&gt;&lt;P&gt;I get around it by simply rounding&amp;nbsp; _time to the nearest 15 minutes (900 seconds):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval _time=round(_time/900,0)*900&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 19:21:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/585770#M204086</guid>
      <dc:creator>dougburdan</dc:creator>
      <dc:date>2022-02-18T19:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why does using "timechart" result in missing values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/633811#M220131</link>
      <description>&lt;P&gt;I had an oddity where I needed eval method after the timechart as I was using it in a single number panel in dashboard studio and if you have no current time span value then it will display an odd "Missing property" error instead. I'm not sure if this would have been a problem in 2017 when&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/15147"&gt;@somesoni2&lt;/a&gt;&amp;nbsp;provided this answer, but it worked for me in this situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc sourcetype=def "search filtering details" 
| timechart span=15m count AS count 
| eval count=coalesce(tonumber(count),0) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 21:06:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-using-quot-timechart-quot-result-in-missing-values/m-p/633811#M220131</guid>
      <dc:creator>jeremiahc4</dc:creator>
      <dc:date>2023-03-08T21:06:02Z</dc:date>
    </item>
  </channel>
</rss>

