Telegraf as collectd forwarder?

Hi there, I’m using telegraf to receive collectd streams and output to InfluxDB.

Is it possible to use telegraf as a collectd binary forwarder? The reason I’m asking is the source data generator sending collectd binary stream only has one output destination that can be configured and I need to send the raw collectd stream to another destination, so I was hoping to use telegraf as a forwarder.

I’m using this as the input - just wondering if there was a way to pass this stream out in original collectd format.

# # Generic socket listener capable of handling multiple socket types.
[[inputs.socket_listener]]
#  Receive collectd stats from VCS devices
service_address = "udp://0.0.0.0:25826"
#
#  ## Data format to consume.
#  ## Each data format has its own unique set of configuration options, read
#  ## more about them here:
#  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "collectd"

#  ## Authentication file for cryptographic security levels
#  ## collectd_auth_file = "/etc/collectd/auth_file"
#  ## One of none (default), sign, or encrypt
#  ## collectd_security_level = "encrypt"
#  ## Path of to TypesDB specifications
collectd_typesdb = ["/usr/share/collectd/types.db"]
  [inputs.socket_listener.tags]
    source = "prodvcs"
1 Like

Hi @sgreszcz,

Unfortunately Telegraf doesn’t support collectd binary protocol as an output format, so this use case isn’t possible. Only Graphite, InfluxDB line protocol, and JSON are currently supported.

Hi,

Is this something that could eventually be implemented?

I have another use case. Our current monitoring infrastructure is centered around Collectd. Many Collectd instances are reporting to a central Collectd, which in turn outputs to InfluxDB. InfluxDB is only accessible from the central Collectd server and all our application servers only have access to Collectd’s network port.

Now we have started using Telegraf for scraping Cloudwatch metrics, because that is something that Collectd does not support. It would be cool if I could use the existing transport mechanism (Collectd network protocol) to get the data from Telegraf to InfluxDB.

Cheers,
TinuzZ.

1 Like

Never mind. Since InfluxDB 2.0 doesn’t support the Collectd protocol anymore, I probably have to make it work the other way around. So all our distributed Collectd’s will report to Telegraf, and Telegraf is the only thing writing to Influx.