Using graphite to with slash in the metric name

Asked by Matthew Gilliard

We'd like to use graphite to monitor per-resource timings etc on a web service, so our ideal metric structure is like this:

info
  resources
    GET
      /1.x/info/whatever
      /1.x/blah/blah

and so on, but it doesn't seem immediately to be possible to use "/" in a metric name as it's converted to a heirarchy somehow. Is there some way of escaping "/" ?

  Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
Matthew Gilliard
Solved:
Last query:
Last reply:
Revision history for this message
Scott Smith (ohlol) said :
#1

In graphite, metric name heirarchies are delimited with periods, so you can just replace them. You may want to convert existing periods to underscores or something, though. So it'd be something like:

1_0.info.whatever 5
1_0.blah.blah 100

Revision history for this message
Matthew Gilliard (matthew-gilliard-u) said :
#2

Hi - thanks for your quick answer,

  actually what you suggest is fine for periods, but we would like "/" characters in our metric names, as they represent URL paths. If it is not possible to use "." or "/" in the metric name then they will come out looking quite weird, which is one of the main reasons we are trying to move away from ganglia...

  So can we somehow escape "/" characters in metric names, or will they always be interpreted as delimiters like "." are?

mg

Revision history for this message
Nicholas Leskiw (nleskiw) said :
#3

These metrics are stored on disk as the name provided. It's a core part of
the current Whisper storage system.
A forward slash is an illegal filename on most systems as it represents a
directory delimiter so the short answer is no, you cannot escape the forward
slash.

On Tue, Sep 20, 2011 at 1:55 PM, Matthew G <
<email address hidden>> wrote:

> Question #171766 on Graphite changed:
> https://answers.launchpad.net/graphite/+question/171766
>
> Status: Answered => Open
>
> Matthew G is still having a problem:
>
> Hi - thanks for your quick answer,
>
> actually what you suggest is fine for periods, but we would like "/"
> characters in our metric names, as they represent URL paths. If it is
> not possible to use "." or "/" in the metric name then they will come
> out looking quite weird, which is one of the main reasons we are trying
> to move away from ganglia...
>
> So can we somehow escape "/" characters in metric names, or will they
> always be interpreted as delimiters like "." are?
>
> mg
>
> --
> You received this question notification because you are a member of
> graphite-dev, which is an answer contact for Graphite.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~graphite-dev
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~graphite-dev
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Matthew Gilliard (matthew-gilliard-u) said :
#4

ok, underscore it is.