Mike Megally
Mike Megally

Reputation: 153

Graphite's Carbon-Cache returning 0 datapoints for > 7 days view

I've setup Graphite + Carbon + Graphina in order to collect data about my home automations and various states of devices in my apartment. Everything was working well up until recently where at least one of my metrics collections doesn't seem to be migrating data from the week view into the 30 day view (as the retention rates dictate).

All of my retention setups were configured exactly the same, so I don't understand why the retention policy wouldn't work for just one sensor.

Here is the state.wsp for the problematic graph:

maxRetention: 315360000
xFilesFactor: 0.5
aggregationMethod: average
fileSize: 523252

Archive 0
retention: 604800
secondsPerPoint: 60
points: 10080
size: 120960
offset: 52

Archive 1
retention: 2592000
secondsPerPoint: 600
points: 4320
size: 51840
offset: 121012

Archive 2
retention: 315360000
secondsPerPoint: 10800
points: 29200
size: 350400
offset: 172852

Here is the state.wsp for a working graph:

maxRetention: 315360000
xFilesFactor: 0.5
aggregationMethod: average
fileSize: 523252

Archive 0
retention: 604800
secondsPerPoint: 60
points: 10080
size: 120960
offset: 52

Archive 1
retention: 2592000
secondsPerPoint: 600
points: 4320
size: 51840
offset: 121012

Archive 2
retention: 315360000
secondsPerPoint: 10800
points: 29200
size: 350400
offset: 172852

So as far as my research goes, both graphs should be archiving the data the same way, but once I move away from the <=7 day view, I get a blank graph:

http://imgur.com/a/gWSJK (apologies for the imgur link - not sure of the best way to paste an image here)

Any and all help is appreciated! If there is some information that might help with debugging, please let me know.

Upvotes: 2

Views: 492

Answers (1)

Chris Madden
Chris Madden

Reputation: 2660

Your config shows that data is expected every 60 seconds. For the less granular 'aggregated' archives those data points are calculated by Carbon, in your case using averaging (aggregationMethod: average). Carbon can only do this roll-up if some number of samples exist (xFilesFactor: 0.5) otherwise it will fill it with null.

In your example you require at least 5 non-null samples in each 10 minute window for the roll-up to the 10 min archive to occur.

If your samples are irregular and you want those archives to populate you can set the xFilesFactor to .1 and then just one sample per 60 seconds is enough for the 10 minute archive to be populated. Set the xFilesFactor in storage-aggregation.conf.

You might also like to read this blog post: Unhelpful Graphite Tip #9 - xFilesFactor

Upvotes: 1

Related Questions