我已按照本教程安装和配置 stats.d 和 Graphite :
但是,我的 Graphite 只能看到本地代理,当我在另一台服务器上启动 statsd 时,出现此错误
30 Jan 10:50:29 - DEBUG: numStats: 3
30 Jan 10:50:29 - DEBUG: Error: connect ECONNREFUSED
这是我的 stats.d local.js 配置文件:
{
graphitePort: 2003
, graphiteHost: "my.ip.add"
, port: 8125
, backends: [ "./backends/graphite" ]
, debug: true
, dumpMessages: true
}
无论我输入 ip 还是 Graphite 主机,都不会改变任何内容。
此外,如果这有帮助的话,这 2 台服务器(一台带有 stats.d 的一台,一台带有 Graphite 的)是运行 Debian 7 的 ovh kimsufi 服务器
最佳答案
看起来像是 here 的 Node 问题(statsd 是一个 Node 应用程序) :
Set the server to bind to 0.0.0.0 and set the client to connect to the correct IP address of the server. If the server is listening on 127.0.0.1, it will only accept connections from its local host.
ENABLE_UDP_LISTENER = True
UDP_RECEIVER_INTERFACE = 0.0.0.0
UDP_RECEIVER_PORT = 2003
关于node.js - 当 Graphite 位于不同服务器上时,Stats.d 会抛出 "connect ECONNREFUSED"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21453054/