在Graphite中组织度量存储?

Noe*_*oel 4 graphite

如何在根级别保存我的指标.目前已保存在统计信息层次结构下(参见graphite)想要保存在顶层(Graphite)

Pra*_*art 7

将这些设置添加到您的statsd配置文件(可能是这样的/etc/statsd.js)

{
  ...(unrelated options)...
, graphite: {
    legacyNamespace: false
  , globalPrefix:  ""
  , prefixCounter: ""
  , prefixTimer:   ""
  , prefixGauge:   ""
  , prefixSet:     ""
  }
}
Run Code Online (Sandbox Code Playgroud)


小智 2

看起来您正在将 statsd 与石墨.js 后端一起使用。

在代码中设置为指标添加统计信息前缀如果在 init() 期间没有提供全局前缀

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

line 180: globalPrefix  = globalPrefix !== undefined ? globalPrefix : "stats";
Run Code Online (Sandbox Code Playgroud)

您将需要更改调用 init() 的方式以为其提供空白的 gobalPrefix。

或者

您需要更改后端才能停止为所有 statsd 指标添加stats 前缀。