Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4270

Troubleshooting • Logging voltage from vcgencmd to influxdb via telegraf

$
0
0
I created this command

Code:

 $ cat /usr/local/bin/influx-vcgencmd.sh#!/bin/shv=$( vcgencmd measure_volts | tr -c -d /[[:digit:].]/ )echo "cpu voltage=$v"
To call from telegraf

Code:

$ tail /etc/telegraf/telegraf.conf[[inputs.exec]]  commands = ["/usr/local/bin/influx-vcgencmd.sh"]  timeout = "3s"  interval = "3m"  data_format = "influx"  [inputs.exec.tags]    bucket = "system"
However, it seems that some useless security nonsense means that the telegraf user can't run `vcgencmd`

Code:

$ influx-vcgencmd.shcpu voltage=0.8403$ sudo -u telegraf influx-vcgencmd.shcpu voltage=////1000
.

How can I get around this?

Statistics: Posted by rwb — Wed Feb 26, 2025 10:42 am



Viewing all articles
Browse latest Browse all 4270

Trending Articles