rpi_exporter
rpi_exporter copied to clipboard
Feature: Get values from file(s)
I have a suggestion for new feature for rpi_exporter.
Would it be possible to implement option like:
--collector.textfile.sources="/sys/bus/iio/devices/iio:device0/in_temp_input,/sys/bus/iio/devices/iio:device0/in_pressure_input"
Some sensors store it's values in /sys/ filesystem and data can be read easily from single file(s) for example:
# cat /sys/bus/iio/devices/iio:device0/in_pressure_input
99.606386718
# cat /sys/bus/iio/devices/iio:device0/in_temp_input
26320
Maybe such "feature", where you can specify multiple files to read, can be implemented in the feature...
I was going to suggest something similar, but for /sys/devices/platform/soc/soc:firmware/get_throttled. Such feature could replace https://github.com/custom-components/sensor.rpi_power for me.
OT: If someone needs it, I wrote an ansible role to install this exporter. Available at https://github.com/paulfantom/ansible-rpi-exporter and https://galaxy.ansible.com/paulfantom/rpi_exporter. It also includes a bit more secure version of systemd service file (https://github.com/paulfantom/ansible-rpi-exporter/blob/master/templates/rpi_exporter.service.j2)
I'll look into that if I have some time around holidays.
Two questions:
- Can I link your ansible role in the README?
- Can I copy your improved systemd service file?
Can I link your ansible role in the README?
Yes
Can I copy your improved systemd service file?
Yes :)