I've been banging my head against a wall with this for the last couple of hours, so I have resorted to ask you guys here.
I've got one collectd instance that is set up to take statsd metrics and use the network
plugin to route them onwards to a main collectd instance that then ships them on to influxdb via the write_graphite
plugin.
Sending metrics to the statsd
plugin works (I've checked with tcpdump
and used the csv
plugin as a debug tool).
It becomes a problem when it comes to the network
plugin to ship the collected metrics off to the "main" collectd instance. The network
plugin seems to only send data once every 100 seconds or when it restarts (I guess it flushes the buffers when it stops).
Here are the configs of the client machine:
/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>
/etc/collectd/conf.d/network.conf
LoadPlugin network
<Plugin "network">
<Server "main-instance-ip" "25826">
SecurityLevel "Encrypt"
Username "collectd"
Password "xxxxxxxx"
</Server>
</Plugin>
/etc/collectd/conf.d/collectd.statsd.conf
LoadPlugin statsd
<Plugin statsd>
Host "0.0.0.0"
Port "8125"
</Plugin>
Here's the output of tcpdump
running for a bit:
$ sudo tcpdump -i any udp port 25826
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
04:49:52.889504 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1337
04:51:52.889498 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1373
04:53:52.889469 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1363
04:55:42.889507 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1375
04:57:42.889504 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1368
04:59:52.889519 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1366
05:01:52.889511 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1363
05:03:42.889507 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1375
05:05:42.889485 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1363
05:07:32.889497 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1375
05:09:32.889477 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1363
05:11:22.889528 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1375
05:13:32.889503 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1395
05:15:42.889484 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1366
05:17:42.889493 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1373
05:19:42.889552 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1368
05:21:52.889502 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1361
05:23:42.889500 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1375
05:25:42.889491 IP ip-10-xxx-xx7-60.ec2.internal.43536 > ip-10-xxx-xx-7.ec2.internal.25826: UDP, length 1363
It seems from the output that it has decided to run every ~2 minutes now instead.