Lower precision archives must cover larger time intervals than higher precision archives

Asked by fp

From what I have read the 'retentions' is setup via:

seconds_per_data_point:data_points_to_store

I want to store 3 months of 5 minute polls (3*30*24*60)/5 = 25920
but beyond that I need much less precise data, say your typical mrtg settings of:
1 week of 30 minute polls (1800:300)
1 month of 2 hour polls (7200:360)
1 year of 24 hour polls (86400:365)

So the retentions I want would be:
retentions = 300:25920,1800:300,7200:360,86400:365

Upon doing so I get the following error:
[console] Unhandled Error
Traceback (most recent call last):
  File "/usr/lib64/python2.4/threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.4/site-packages/twisted/python/threadpool.py", line 210, in _worker
    result = context.call(ctx, function, *args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/twisted/python/context.py", line 59, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/usr/lib64/python2.4/site-packages/twisted/python/context.py", line 37, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "/opt/graphite/lib/carbon/writer.py", line 144, in writeForever
    writeCachedDataPoints()
  File "/opt/graphite/lib/carbon/writer.py", line 93, in writeCachedDataPoints
    whisper.create(dbFilePath, archiveConfig)
  File "/usr/lib/python2.4/site-packages/whisper.py", line 150, in create
    assert nextRetention > retention,\
exceptions.AssertionError: Lower precision archives must cover larger time intervals than higher precision archives (300, 25920),(1800, 300)

Am I doing it wrong, or is this intended? I can make it work with a
retentions = 300:25920,1800:25920,7200:25920,86400:25920

but that is a whole lot of data (and storage) I don't want.

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
chrismd (chrismd) said :
#1

So there are two ways to do this, depending on what your needs are.

Whisper's configuration is probably different than MRTG/RRD, I don't recall how they handle this situation off the top of my head, but here's how it works with whisper.

So you want 3 months of 5 minute polls and 1 week of 30 minute polls (ignore the others for now). Do you mean that you want the previous 3 months to be stored at 5 minute precision and then the week prior to that (ie 3 months ago to 3 months and 7 days ago)? If so then just tell whisper you want 300:25920 (3 months of 5 minute data) and 1800:4656 (97 days of 30 minute data).

However if what you want is to have recent data stored in several different levels of precision, ie. the last 3 months at 5 minute precision and the last week at 30 minute precision, etc... then you need to have a separate whisper file (so a different metric name).

Can you help with this problem?

Provide an answer of your own, or ask fp for more information if necessary.

To post a message you must log in.