在过去的几个小时里,我一直在用这个头撞墙,所以我在这里问你们。
我有一个 collectd 实例,它被设置为获取 statsd 指标并使用network
插件将它们路由到主 collectd 实例,然后通过write_graphite
插件将它们发送到 influxdb 。
向statsd
插件发送指标有效(我已经检查tcpdump
并使用csv
插件作为调试工具)。
当network
插件将收集到的指标发送到“主要”collectd 实例时,这成为一个问题。该network
插件似乎每 100 秒或重新启动时只发送一次数据(我猜它在停止时刷新缓冲区)。
以下是客户端机器的配置:
/etc/collectd/collectd.conf
Hostname "collectd.client"
FQDNLookup false
BaseDir "/var/lib/collectd"
PluginDir "/usr/lib/collectd"
TypesDB "/usr/share/collectd/types.db"
AutoLoadPlugin false
Interval 10
LoadPlugin logfile
<Plugin logfile>
LogLevel "info"
File "/var/log/collectd.log"
Timestamp true
PrintSeverity true
</Plugin>
<Include "/etc/collectd/conf.d">
Filter "*.conf"
</Include>
Run Code Online (Sandbox Code Playgroud)
/etc/collectd/conf.d/network.conf
LoadPlugin network
<Plugin "network">
<Server "main-instance-ip" "25826">
SecurityLevel "Encrypt"
Username "collectd"
Password "xxxxxxxx"
</Server>
</Plugin>
Run Code Online (Sandbox Code Playgroud)
/etc/collectd/conf.d/collectd.statsd.conf …
collectd ×1