Don't lie when Graphite is missing 10-second data. #20

Open
mbostock opened this Issue Jun 28, 2012 · 10 comments

Comments

Projects
None yet
7 participants
Collaborator

mbostock commented Jun 28, 2012

Currently Graphite will return its lowest-resolution data when Cubism requests 10-second metrics; however, the lowest-available resolution may in fact be higher resolution (such as 1-minute data). Cubism, not knowing any better, displays this data inaccurately rather than upsampling the data.

I think this may be what's causing my data to graph strangely with Cubism. Is there some function I can apply on the Graphite side to fix the problem until Cubism has a fix?

Collaborator

mbostock commented Jul 11, 2012

You might be able to summarize(metric, "10s").

That worked, thanks!

Before all the data was compressed into the left-most 20% of the graph with blank space on the remaining 80%.

Now I'm getting a vertical bar one pixel wide, then several blank bars, then another bar, repeating in that pattern. But at least it fills the width of the graph.

Contributor

phobos182 commented Jul 12, 2012

I had this issue as well. Debugging found that if data in graphite needed to be rendered in seconds, Cubism was sending the request with milliseconds.

#21

This is most likely not the cause of the original issue. Just the one jeffcjohnson was talking about.

Thanks for letting me know and figuring out the problem!

joeshaw commented Sep 15, 2012

Graphite returns the step interval in its raw data output. From http://graphite.wikidot.com/url-api-reference:

target1, startTime, endTime, step | value1, value2, ..., valueN
target2, startTime, endTime, step | value1, value2, ..., valueN

I had the same issue and after mbostock pointed me in the right direction I noticed that my step interval was 60 instead of 10. Maybe cubism can adjust based on that.

So what's the fix for this? I am using StatsD+Graphite with the default step value and all my values are squished to the left. If I use summarize(metric, "10s") I get vertical lines. Shouldn't Cubism realize how to show the values correctly?

zwily commented Nov 19, 2012

diegovar - You might be able to use keepLastValue(summarize(metric, "10s")) to fill in those gaps. The problem with that is it will fill in legitimate gaps in data too.

kisielk commented Dec 10, 2013

The other problem with the keepLastValue(summarize(...)) approach seems to be that while it fills in the data on the first render of the page, new data does not have the gaps filled in.

kisielk commented Dec 10, 2013

Okay, simple and in hind-sight obvious fix to the above is to change the context.serverDelay to match the resolution of the dataset being summarized. For example if you have 1 minute resolution, set serverDelay to 60 * 1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment