14

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 ?

1 Answers1

19

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
Matt Self
  • 19,520
  • 2
  • 32
  • 36
  • The whisper-info.py gave mi information that the seconds to point is 60. When I removed the wsp the new one had STP set to 1. So that was the root cause. Does it meand that once created the wsp have always the same schema ? – Krzysztof Zielinski Jun 12 '13 at 13:12
  • Correct. For existing metrics the new schema will not be adopted. You must use whisper-resize.py to modify existing metrics to take on the new schema. Another option, which you used :), is to delete the whisper file and restart carbon-cache.py so the files get recreated. I'll update the answer to include this info. Thanks. Glad it worked. – Matt Self Jun 12 '13 at 15:09
  • 1
    I reset cache duration to 1 and deleted old metrics file, but the new ones still have 60 seconds per point. Any ideas on how to change it? – chester89 Dec 26 '13 at 11:37
  • I seem to have the same issue as @chester89. This is the output of whisper-info for one of my counters/.../count.wsp files: maxRetention: 604800 xFilesFactor: 0.0 aggregationMethod: sum fileSize: 120988 Archive 0 retention: 604800 secondsPerPoint: 60 points: 10080 size: 120960 offset: 28 – Greg Dubicki Jun 23 '15 at 12:26
  • 2
    @chester89 Ok, I have had an error in my storage-schemas.conf . I used validate-storage-schemas tool to find this out (it was also logged). This post helped me to find out about existence of this tool: http://stackoverflow.com/a/25429548/2693875 - upvote it (and this comment please :)) if it helped you. – Greg Dubicki Jun 23 '15 at 12:34