node.js - 当 Graphite 位于不同服务器上时,Stats.d 会抛出 "connect ECONNREFUSED"错误

标签 node.js graphite statsd

我已按照本教程安装和配置 stats.d 和 Graphite :

http://www.elao.com/blog/linux/install-stats-d-graphite-on-a-debian-server-to-monitor-a-symfony2-application-12.html

但是,我的 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/

相关文章:

c - 虽然 true 不起作用

python - statsd 仪表的用例是什么?

docker - Kamon、Statsd、Grafana 磁盘空间

node.js - 从 Node.js 的缓冲区中删除 "empty"字节

javascript - 为什么我的回调无法正常工作?

jquery - 将服务器端变量发送到客户端node.js和socket.io

python - 从 python 客户端发送带有标签的 statsD 指标

node.js - 就 mongoDb 而言,GeoJSON 和 Legacy 坐标对有什么区别?

javascript - 在 Grafana 中交换 Graphite 返回的时间戳和值

performance - 使用 Graphite+Grafana 测量服务的正常运行时间