graphite-project / carbonate

Utilities for managing graphite clusters
MIT License
516 stars 80 forks source link

remove +1 to root_path to keep metric's first character #3

Closed prfalken closed 10 years ago

prfalken commented 10 years ago

On my setup, carbon-list prints out metrics without the first character like that: arbon.relays.graph-01-1.memUsage arbon.relays.graph-01-1.cpuUsage

I don't understand why you added this +1 so I assume it's a bug.

jssjr commented 10 years ago

Thanks for the report. Very strange. What command line syntax are you using to run carbon-list?

jssjr commented 10 years ago

With the patch applied on my setup, I'm seeing

% bin/carbon-list
.carbon.carbon-daemons.albatross-3_local.example.writer.cached_metrics
.carbon.carbon-daemons.albatross-3_local.test.metrics_received
.carbon.carbon-daemons.albatross-3_local.test.pipeline.cache_microseconds.avg
.carbon.carbon-daemons.albatross-3_local.test.pipeline.cache_microseconds.max
.carbon.carbon-daemons.albatross-3_local.test.pipeline.cache_microseconds.min
jssjr commented 10 years ago

:ok: I was able to add test coverage for this against a CLI refactor branch I'm working on. You can see the output here in Travis. The problem occurs with the storage dir has a trailing dir separator. This is a bug, as the storage dir path should be normalized before we walk it. Good catch!

prfalken commented 10 years ago

Great ! Thank you for the very helpful scripts.