0

我正在使用石墨0.9.2。今天,我使用这个命令启动 carbon export PYTHONPATH=/home/local/ZOHOCORP/bharathi-1397/softwares/graphite/whisper-0.9.10; nohup ./bin/carbon-cache.py --debug start &。我收到以下错误。

    Traceback (most recent call last):
  File "./bin/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/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/usr/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 139, in loadStorageSchemas
    except InvalidConfiguration, e:
NameError: global name 'InvalidConfiguration' is not defined

我的storage-schemas.conf档案。

    [carbon]
pattern = ^carbon\.
retentions = 60:90d

[stats_schema_data_storage_retention]
pattern = stats.*
retentions = 1m:7d,5m:21d,1h:30d,1d:1y,1m:3y

[service_registration]
pattern = registration.*
retentions = 1m:7d,5m:21d,1h:30d,1d:1y,1m:3y

[server_load]
priority=100
pattern=^servers\.
retentions=60:43200,900:350400

请帮我解决问题。

4

2 回答 2

3

问题是您定义了相同的保留 - 1m:

保留 = 1m :7d,5m:21d,1h:30d,1d:1y, 1m :3y

这是错误的,当您定义保留设置时,您必须按照从较高精度到较低精度的顺序来定义它 - 所以实际上直到 1m:3y 一切都很好。

可以参考: https ://github.com/tmm1/graphite/blob/master/whisper/whisper.py

请参阅 validateArchiveList 方法说明:与高精度归档相比,低精度归档必须覆盖更大的时间间隔。

另外我建议您阅读以下内容:

http://graphite.wikidot.com/getting-your-data-into-graphite http://graphite.readthedocs.org/en/1.0/whisper.html#multi-archive-storage-and-retrieval-behavior

于 2013-03-14T11:58:18.833 回答
0

我认为您的问题是您在 storage-schemas.conf 中指定了两次保留 1 分钟数据的事实。您已指定 1m:7d 和 1m:3y。

但是,您得到的错误看起来石墨源代码中有问题。当我查看代码时,它应该报告一些更有帮助的消息。也许这在较新的版本中已修复(最新的是 0.9.10),否则将其报告为错误可能是个好主意;)

于 2013-02-26T08:07:56.800 回答