4

如何让我的指标保存在根级别。目前已保存在统计信息层次结构下(见石墨)想要保存在顶层(石墨)下

4

2 回答 2

7

将这些设置添加到您的 statsd 配置文件(可能类似于/etc/statsd.js

{
  ...(unrelated options)...
, graphite: {
    legacyNamespace: false
  , globalPrefix:  ""
  , prefixCounter: ""
  , prefixTimer:   ""
  , prefixGauge:   ""
  , prefixSet:     ""
  }
}
于 2013-08-06T04:10:36.357 回答
2

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

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

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

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

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

或者

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

于 2013-04-06T03:41:52.947 回答