Closed lukehoersten closed 4 years ago
Yes, in theory we could change how we collect the temperate on different systems.
Just for reference: https://github.com/lukasmalkmus/rpi_exporter/issues/11 and https://github.com/carlosedp/docker-arm_exporter/issues/4. Is it possible to install libraspberrypi-bin
?
I don't have a Pi4 at my hands so I either need to make a fire and forget approach and hope it works without testing it on a live Pi or we iterate together on another branch. If you feel confident you could check out that branch, build from source and test that for me.
On a side note, is it possible to combine these 2 projects (carlosedp/docker-arm_exporter and lukasmalkmus/rpi_exporter)? Going back and forth between for these issues is a bit annoying. @lukasmalkmus @carlosedp
I can definitely compile from source to test on the pi4 ubuntu amd64. Just let me know what to try. I don't know Go but I can certainly figure out how to build and run it.
Looks like can just query the file system
@gclawes I wouldn't mind that, however @carlosedp did all the work on the Docker stuff. He's also the owner of the DockerHub repo. But maybe we can use GitHub Actions to get something going? Let's wait for his opinion.
@lukehoersten Sounds good. But give some time to iterate, bit busy atm. I try to bring up something...
@lukehoersten I looked at the link and we are actually reading from that file: https://github.com/lukasmalkmus/rpi_exporter/blob/5372e0aa9edb1466e9abe031237c3ec632bbacf8/collector/cpu.go#L41
It is just the GPU collector that fails in your case. Can you check https://github.com/carlosedp/docker-arm_exporter/issues/4 again? There have been some comments and updates to the Docker image? How are you running the exporter? Binary or Docker image?
Does anyone know how vcgencmd
reads the GPU temperature? I don't think it's exported in sysfs, it seems to rely on /dev/vchiq
@lukasmalkmus ah you're right - the links I provided were for CPU temp which I incorrectly assumed would provide a method to read GPU temp as well.
I looked at the docker issue and it seems they've closed the issue as the problem lies with the underlying rpi_exporter bin we are discussing here. I do not believe they discovered any resolution. I run the binary directly.
@gclawes I think this is the crux of the issue: how do we read the GPU temp?
We could simply gracefully degrade and not report a GPU temp if it's not available to read. That would solve my issue which is that the logs are getting flooded every time it tries and fails to read the GPU temp. It looks like there's a metric for reporting whether the GPU temp was read rpi_scrape_collector_success{collector="gpu"} 0
which would be enough for me.
@lukehoersten If that is the only reason, you might get away with setting --collector.gpu=false
till we find a better solution for collecting GPU temp on Ubuntu.
@lukasmalkmus with regards to the docker repo and github actions, you can use Github Actions to build and push to either Github Packge docker registry, or open your own Docker Hub repository. I don't think Docker Hub automated build support arm images, but I think there's ways to do it in Github Actions.
If you want, I can fork this repo and take a crack at it.
I don't get the need for forking either repo. My DockerHub repo (https://hub.docker.com/r/carlosedp/arm_exporter) contains the image and has more than 5M pulls. Why the need to fork? I just pull the latest code from here, build and pack into an image. Let me know if there are improvements required to it.
In my mind it's generally easier to build code + docker all in the same repo, in the same CI pipeline. Just my 2 cents.
The docker repo discussion is a bit off-topic form the exporter binary not working on arm64.
I don't use docker and don't care to see issues related here. There are many different packaging tools and many different ways to package with the same tool. Keeping the docker repo separate with @carlosedp allows for that separation of concerns.
@lukehoersten If that is the only reason, you might get away with setting
--collector.gpu=false
till we find a better solution for collecting GPU temp on Ubuntu.
@lukasmalkmus I tried that but it doesn't seem to parse:
/usr/local/bin/rpi_exporter --collector.gpu=false
rpi_exporter: error: unexpected false, try --help
I agree, and also there is no problems related to the Docker image itself.
@lukehoersten Sorry, I didn't double check it on my system, that command came from my mind. Try ./rpi_exporter --no-collector.gpu
. This is node-exporter inspired, it works the same.
Collectors are enabled by providing a --collector.
flag. Collectors that are enabled by default can be disabled by providing a --no-collector. flag.
--no-collector.gpu
worked - thanks!
I close this issue. The problem of the OP has been resolved. Since I don't think this is a case of "not working", I won't take action atm. I think this is an edge case. If this really becomes a problem for whatever reason, we can still decide to work around the problem by detecting the exact OS, first.
sounds good.
On Wed, May 13, 2020 at 1:50 PM Lukas Malkmus notifications@github.com wrote:
I close this issue. The problem of the OP has been resolved. Since I don't think this is a case of "not working", I won't take action atm. I think this is an edge case. If this really becomes a problem for whatever reason, we can still decide wo work around the problem by detecting the exact OS, first.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lukasmalkmus/rpi_exporter/issues/13#issuecomment-628178271, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAFZ25AJDCOW6FEV2SFZDRRLTVVANCNFSM4MZ6ZAIA .
The Ubuntu arm64 image allows for 64bit rpi applications though the /opt/vc/ is not something that's available.
Maybe need an alternate approach like this: https://askubuntu.com/questions/15832/how-do-i-get-the-cpu-temperature
https://github.com/lukasmalkmus/rpi_exporter/blob/8bef384ed5eaa5e0666e6f8289b898881270dcbc/collector/gpu.go#L38 for reference