Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Get values from file(s) #10

Open
ruzickap opened this issue Aug 13, 2019 · 3 comments
Open

Feature: Get values from file(s) #10

ruzickap opened this issue Aug 13, 2019 · 3 comments
Assignees
Milestone

Comments

@ruzickap
Copy link
Contributor

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...

@paulfantom
Copy link

paulfantom commented Dec 12, 2019

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)

@lukasmalkmus
Copy link
Owner

lukasmalkmus commented Dec 12, 2019

I'll look into that if I have some time around holidays.

Two questions:

  1. Can I link your ansible role in the README?
  2. Can I copy your improved systemd service file?

@paulfantom
Copy link

Can I link your ansible role in the README?

Yes

Can I copy your improved systemd service file?

Yes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants