Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite - render precision lower than 1 minute

Tags:

graphite

I'm trying to get arroud with Graphite. I have problem getting graph render precision lower that minute. I already set refresh time to 1 second, display time to relateive -5 minutes and retention to:

retentions = 1s:21d

Graph is updated every second, but the precision is still one minute. How can I change this ?

like image 372
Krzysztof Zielinski Avatar asked Jun 11 '13 13:06

Krzysztof Zielinski


1 Answers

First, I assume the pattern matches appropriately for the retention. For example:

[default_1s_for_21days]
pattern = .*
retentions = 1s:21d

Second, make sure you restart carbon after you modify the storage-schemas.conf file. If you have existing metrics (existing .wsp files) that you need to keep and you'd like them to adopt this schema you need to run whisper-resize.py on the .wsp. If you don't need to keep existing data then you can just delete the .wsp files and restart carbon-cache.py.

Third, verify the settings by looking at some whisper data by running whisper-info.py against a .wsp file. Find the .wsp file for one of your metrics in /graphite/storage/whisper/ and validate the settings. Run:

whisper-info.py my_metric_data.wsp

I'm curious if the 1s precision for that long (21 days) is causing trouble (e.g. causing aggregation), but you should see it if that is the case by checking the .wsp file using whisper-info.py. Anyway, good to confirm that the storage precision is correct and rule it out.

Lastly, and this is probably the problem, check the graphite web caching. Make sure the graphite web app isn't caching for 60 seconds (which is the default). Go to /[graphite_location]/webapp/graphite/settings.py and modify the DEFAULT_CACHE_DURATION.

So, in settings.py, change it to 1 from 60. Like so:

DEFAULT_CACHE_DURATION = 1
like image 138
Matt Self Avatar answered Nov 17 '22 04:11

Matt Self