Collectd -> Telegraf -> InfluxDB2

Hi,

I have upgrade my InfluxDB from 1.8 to 2.1. For preserve my Collectd (OpenWRT) monitoring, now I use Telegraf to inject data from Collectd to InfluxDB.

[[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"]

Since this modification, I have loosed information about stations:

from(bucket: "${bucket}")
  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)
  |> filter(fn: (r) =>
    r._measurement == "iwinfo_value" and
    r._field == "value" and
    r.host == "hubble" and
    r.type == "stations" and
    r.instance == "wlan0"
  )
  |> aggregateWindow(every: v.windowPeriod, fn: last)
  |> yield(name: "last")

Is there some informations to set to define type (type=stations) in the collectd injection ?

Hi,

As there are a number of moving parts in your configuration, I think the first step is determining where the data is getting lost.

I like to use Telegraf’s [[outputs.file]] to write the data I am collecting to stdout. That way I can ensure that the data is actually getting collected by Telegraf first.

Is that something you could try? Or are you certain the data is in InfluxDB already?

Thanks!

OK, solved. I have copy/paste the types.db from openwrt in my telegraf server. It’s seem OK !