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
inputs.intel_powerstat probably not honoring HOST_MOUNT_PREFIX #14881
Comments
I believe the plugin now depends on github.com/intel/powertelemetry for reading and collecting all the necessary data points. That means that it would need to learn about this environment variable. @zak-pawel - is my understanding correct? If so, is this something you would consider adding? |
Edit: I'm sorry the |
@divStar Right, in the initial version of https://github.com/intel/powertelemetry, we did not implement support for |
@p-zak - thank you very much! I currently found a workaround by running one instance of Telegraf locally and submitting the values to the same InfluxDB. It's not a pretty solution, but it works. Is there anything I can help with? I am a software engineer with some experience, albeit mostly in Java (but also have done many other languages). Also anyone: please feel free to close it, especially if there is an issue we could link to. |
@divStar
In newest versions of docker, you will need the "privileged" flag as well. |
@divStar can you please open an upsteram issue in the https://github.com/intel/powertelemetry repo please to add this and link the issue here. |
I've created the issue, mostly copying the issue description from here (I am not sure if I should have reduced the description, but I added a |
Relevant telegraf.conf
Logs from Telegraf
System info
Ubuntu 22.04.03, Telegraf 1.29.5, Docker (Server Version) 25.0.3
Docker
Steps to reproduce
lsmod | grep rapl
).cpuid
installed (sudo apt-get install -y cpuid
)-services-network
and is abridge
-type network).docker-compose.yaml
with just Telegraf - as mentioned in the docker part above.input.intel_powerstat
.docker-compose.yaml
file.Expected behavior
I expect the plugin to look for
PowerTelemtry
inside/hostfs/sys/...
or/hostfs/dev/...
etc., to not throw any errors and ultimately grab the corresponding values.Actual behavior
As
2024-02-22T15:53:52Z W! [inputs.intel_powerstat] Plugin started with errors: PowerTelemetry instance initialized with errors: failed to initialize msr: invalid MSR base path "/dev/cpu": file "/dev/cpu" does not exist; failed to initialize rapl: invalid base path of rapl control zone: file "/sys/devices/virtual/powercap/intel-rapl" does not exist
states, the plug in does not find the corresponding folders./hostfs/dev/cpu
and `/hostfs/sys/devices/virtual/powercap/intel-rapl" do indeed exist, but they seem to not be found.Additional info
I've checked out the project and tried looking around, but I cannot find where (if at all)
HOST_MOUNT_PREFIX
or any of theHOST_*
environment variables would be used. They are used to some extent in other plugins it seems, but not in this one.Edit: I also figured the following: when installing Telegraf locally - even though MSR and RAPL are available - I had to do a couple of things before I could use it locally, namely this:
After that, Telegraf started working locally and sending values to my InfluxDB in the container as I'd expect it to.
In the containerized Telegraf instance though, even mounting to
/sys
and/dev
directly (not/hostfs/sys
and/hostfs/dev
) and even usingprivileged: true
anduser: "0:0"
, I could not get it to work.I probably could help create a PR if someone was to show me where to dig.
The text was updated successfully, but these errors were encountered: