尝试启动碳缓存时的ValueError

时间:2013-06-23 09:16:50

标签: graphite

我遇到了 Graphite 的问题,特别是碳缓存问题。在某些时候,我让它运行。现在几个星期后回来的时候,我试着重新开始石墨。 django-webapp运行正常,但似乎我有碳缓存后端的问题。 Graphite安装在/ opt / graphite中,我运行/opt/graphite/bin/carbon-cache.py start。这是我得到的错误:

root@stfutm01:/opt/graphite/bin# ./carbon-cache.py start
Starting carbon-cache (instance a)
Traceback (most recent call last):
  File "./carbon-cache.py", line 30, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 92, in run_twistd_plugin
    runApp(config)
  File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 446, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/opt/graphite/lib/twisted/plugins/carbon_cache_plugin.py", line 21, in makeService
    return service.createCacheService(options)
  File "/opt/graphite/lib/carbon/service.py", line 127, in createCacheService
    from carbon.writer import WriterService
  File "/opt/graphite/lib/carbon/writer.py", line 34, in <module>
    schemas = loadStorageSchemas()
  File "/opt/graphite/lib/carbon/storage.py", line 123, in loadStorageSchemas
    archives = [ Archive.fromString(s) for s in retentions ]
  File "/opt/graphite/lib/carbon/storage.py", line 107, in fromString
    (secondsPerPoint, points) = whisper.parseRetentionDef(retentionDef)
  File "/usr/local/lib/python2.7/dist-packages/whisper.py", line 76, in parseRetentionDef
    (precision, points) = retentionDef.strip().split(':')
ValueError: need more than 1 value to unpack

我认为这是拆分retentionDef.strip().split(':')的一个问题。我的存储架构配置文件(/opt/graphite/conf/storage-schemas.conf)如下所示:

[stats]
priority = 110
pattern = ^stats\..*
retentions = 10s:6h,1m:7d,10m:1y
[ts3]
priority = 100
pattern = ^skarp\.ts3\..*
retentions = 60s:1y,1h,:5y

我应该看的任何提示?或者有人知道我在这里缺少什么吗?

1 个答案:

答案 0 :(得分:4)

我认为问题在于[ts3]租借。 “The retentions line can specify multiple retentions. Each retention of frequency:history is separated by a comma.

在ts3中,它似乎是3个保留(逗号分隔),第二个没有指定历史记录而最后一个没有指定频率。

retentions = 60s:1y,1h,:5y

我想你可能意味着:

retentions = 60s:1y,1h:5y

这将是1年的60秒数据和5年后的1小时数据。