0

I am using graphite 0.9.2. Today , I start carbon using this command export PYTHONPATH=/home/local/ZOHOCORP/bharathi-1397/softwares/graphite/whisper-0.9.10; nohup ./bin/carbon-cache.py --debug start & . I got the below error.

    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

My storage-schemas.conf file.

    [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

Please help me to resolve the issue.

kannanrbk
  • 6,964
  • 13
  • 53
  • 94

2 Answers2

3

The problem is that you defined the same retention - 1m:

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

This is wrong, when you define the retentions settings you have to define it by order from higher precision to lower - so actually until the 1m:3y everything was fine.

You can refer to: https://github.com/tmm1/graphite/blob/master/whisper/whisper.py

See the validateArchiveList method description: Lower precision archives must cover larger time intervals than higher precision archives.

Also I suggest that you'll read the followings:

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

Tomer Peled
  • 3,571
  • 5
  • 35
  • 57
0

I think your problem is the fact to you specify the retension of 1 minute data twice in your storage-schemas.conf. You have specified 1m:7d and also 1m:3y.

The error you got however looks like there is something wrong here in the graphite source code. As i've looked into the code and it should report some more helpful messages. Maybe this is fixed in newer versions (newest is 0.9.10), otherwise maybe it's a good idea to report this as a bug ;)

TheNameless
  • 363
  • 3
  • 8