No data in influxdb

Hello,

I’m trying to push data from my raspberrypi into influxdb, but can find why data is not written in influx

telegraf:

[[inputs.exec]]
commands = ["vcgencmd measure_temp"]
name_override = "measure_temp"
timeout = "5s"
data_format = "value"
data_type = "string"

If I run telegraf -test -config /etc/telegraf/telegraf.d/raspberrypi.conf
I got value but there is nothing in influx

measure_temp,host=raspberrypi value="temp=43.3'C" 1630519522000000000

What could be the problem?

Thanks!

do you also have the InfluxDB output configured?

the -test param does not run any output plugin, therefore you won’t see problems related to them.
Try to use the -once, it will run each plugin just one time and send all to the output.

Thanks for hint with -once, after I saw error about VCHI initialization failed

[inputs.exec] Error in plugin: exec: exit status 255 for command ‘/usr/bin/vcgencmd measure_temp’: VCHI initialization failed

Found in Google how to solve it:

root@raspberrypi:/etc/telegraf/telegraf.d# ls -al /dev/vchiq
crw------- 1 root root 236, 0 Jul 20 14:38 /dev/vchiq
root@raspberrypi:/etc/telegraf/telegraf.d# sudo chgrp video /dev/vchiq
root@raspberrypi:/etc/telegraf/telegraf.d# sudo chmod 0660 /dev/vchiq
root@raspberrypi:/etc/telegraf/telegraf.d# ls -al /dev/vchiq
crw-rw---- 1 root video 236, 0 Jul 20 14:38 /dev/vchiq

After that, no errors