【问题标题】:How to push system metric from one machine to another in linux using collectd?如何使用collectd在Linux中将系统指标从一台机器推送到另一台机器?
【发布时间】:2019-07-31 04:32:17
【问题描述】:

我有两台 centos 机器,机器 A 和机器 B。在 机器 A 中,我安装了 collectd 和 influxdb。因此,来自机器 A 的系统指标被使用 collectd 推送到 influxdb 中。 我已经在机器 B 中安装了 collectd。现在,我需要将系统指标从机器 B 推送到机器 A 中的 influxdb

Collectd 使用端口 25826。当我在机器 A 中运行下面提到的命令时,我的输出是:

机器 A:

command: netstat -tuplen | grep ':25826'
 output : udp6       0      0 :::25826  :::* 981  325073833  23132/influxd

在机器 B 中:

sudo netstat -tuplen | grep ':25826'

没有输出

当我在 机器 B 中使用下面提到的命令时:

command:telnet "xxx.xx.xx.xx" "25826"
output:Trying xxx.xx.xx.xx...
telnet: connect to address xxx.xx.xx.xx: No route to host

如何在机器 B 中创建主机...以便我可以将度量值从机器 B 推送到机器 A...从两台机器 PING 命令都在工作

【问题讨论】:

  • 在机器 B 上启动 influxd。
  • @Cyrus 怎么做?你能帮我吗...我的想法是我只需要一台服务器在机器上,我需要将所有系统指标从机器B推送到机器A
  • 您的问题更适合Super User。此页面旨在解决编程问题。
  • @Cyrus...好的,你能帮我解决这个问题吗

标签: linux bash collectd


【解决方案1】:

在机器 A 中,您正在运行 Influx。 Influx 正在侦听端口 :25826. 这是您在运行 netstat -tuplen | grep ':25826' output : udp6 0 0 :::25826 :::* 981 325073833 23132/influxd 时看到的内容 如果您想将指标从机器 B 发送到机器 A 上,请编辑机器 B 上 collectd 的网络插件选项

应该是这样的

块引用

LoadPlugin  network
<Plugin network>
Server "<Machine A IP>" "25826"
</Plugin>

【讨论】:

  • 感谢您的回复...我已经添加了相同的...它不起作用...请帮助我
猜你喜欢
  • 2019-05-19
  • 1970-01-01
  • 1970-01-01
  • 2021-10-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多