lukasmalkmus / rpi_exporter

A Raspberry Pi CPU temperature exporter.
Apache License 2.0
78 stars 17 forks source link

Make vcgencmd path configurable #18

Closed cyc1ingsir closed 2 years ago

cyc1ingsir commented 2 years ago

this is a fix for #15 as the path seems to have changed

# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
# uname -a
Linux raspi 5.10.63-v8+ #1496 SMP PREEMPT Wed Dec 1 15:59:46 GMT 2021 aarch64 GNU/Linux
# which vcgencmd 
/usr/bin/vcgencmd

./rpi_exporter --vcgencmd=/usr/bin/vcgencmd
lukasmalkmus commented 2 years ago

Thank you for the PR!

I feel like it would be preferable to not just configure the location of the binary but the while binary path (including its name). Wdyt? Unlikely to happen but this would account for the case of vcgencmd residing under a different name.

cyc1ingsir commented 2 years ago

That sound good to me. Meanwhile I stumbled upon another approach making it configurable via an env variable: https://github.com/jovalle/rpi-exporter/commit/45ca16568f48d291afc9351c9b7c46f3b4043de3 Maybe this is a even better solution.

lukasmalkmus commented 2 years ago

Im fine with both but think that a flag is more discoverable by users.

lukasmalkmus commented 2 years ago

@carlosedp I'll tag a new release, can you take care of the Docker Image, again?

lukasmalkmus commented 2 years ago

@carlosedp v0.8.0 has been tagged!