Noel
Noel

Reputation: 5369

Organisaing metric storage in Graphite?

How can I get my metrics to be saved at the root level. Currently been saved under the stats hierarchy (see graphite) Want to save under the top level(Graphite)

Upvotes: 5

Views: 1016

Answers (2)

Prathan Thananart
Prathan Thananart

Reputation: 4077

Add these settings to your statsd configuration file (possibly something like /etc/statsd.js)

{
  ...(unrelated options)...
, graphite: {
    legacyNamespace: false
  , globalPrefix:  ""
  , prefixCounter: ""
  , prefixTimer:   ""
  , prefixGauge:   ""
  , prefixSet:     ""
  }
}

Upvotes: 8

dannyla
dannyla

Reputation: 1990

It looks like your using statsd with the graphite.js backend.

In the code is setup to prefix the metrics with stats. if no globalprefix is provided during the init()

https://github.com/etsy/statsd/blob/master/backends/graphite.js

line 180: globalPrefix  = globalPrefix !== undefined ? globalPrefix : "stats";

You will need to change how your calling the init() to offer it a blank gobalPrefix.

OR

You would need to alter the backend in order to stop is prefix all your statsd metrics with stats.

Upvotes: 2

Related Questions