Collectd in InfluxDB2.0
Asked Answered
M

2

5

I want to deploy influxDB with collectd. For previous version ie 1.8 of influxDB it was supported. Do we have support for collectd in the latest version of influxdb i.e 2.0?

Muniment answered 19/8, 2021 at 11:4 Comment(0)
S
6

This functionality was moved to telegraf. in /etc/telegraf/telegraf.conf you have to define a collectd input and an influxdb output, then it works. I haven't found an example so I had to piece it together from different sources of documentation:

[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  hostname = ""
  omit_hostname = false
[[inputs.socket_listener]]
  service_address = "udp://:25826"
  data_format = "collectd"
  collectd_auth_file = "/etc/collectd/collectd.auth"
  collectd_security_level = "encrypt"
  collectd_typesdb = ["/usr/share/collectd_types.db"]
  collectd_parse_multivalue = "split"
[[outputs.influxdb_v2]]
 urls = ["http://influxdb:8086"]
 token = "$DOCKER_INFLUXDB_INIT_ADMIN_TOKEN"
 organization = "$DOCKER_INFLUXDB_INIT_ORG"
 bucket = "$DOCKER_INFLUXDB_INIT_BUCKET"
Susumu answered 16/1, 2022 at 14:10 Comment(0)
S
0

The earlier provided answer already points to the basics but I found it useful to update this with the current state of the documentation for Telegraf v1.30. And collectd is supported by the generic inputs.socket_listener for the input side. Information can be found here for collectd.

There is a whole list of other supported data formats. Look there for specific configuration settings needed in the inputs.socket_listener.

The example telegraf.conf, which can be created by running:

telegraf config > telegraf.conf

will be saved in the install directory.

As telegraf transforms data it reads, it also needs to have an output side. The influx one is advised. See the different outputs.* options in the telegraf.conf.

Sumerian answered 5/6 at 18:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.