-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/hostmetrics] Process scraper ignores root_path when getting process information #24777
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Do you have any environment variables set? |
If you're referring to the ones on this page: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/ I do not have any of those set, no. |
No, I refer to HOST_PROC specifically. |
No, I don't have that set either. |
OK. Please try with this env var set to |
I have opened a PR to fix a possible collision, as the awscontainerinsightsreceiver also was setting this env var. |
Setting the env variable as you instructed solved the problem, thank you! |
/label -needs-triage |
Remove the need to set the environment variable HOST_PROC as part of the awscontainerinsightsreceiver #24777
…g entry (#26479) **Description:** A regression introduced in 0.82.0 means that the process scraper doesn't properly respect the `root_path` configuration key when it comes to reading process information. **Link to tracking Issue:** Fixes #24777 --------- Co-authored-by: Pablo Baeyens <[email protected]>
Remove the need to set the environment variable HOST_PROC as part of the awscontainerinsightsreceiver open-telemetry#24777
…g entry (open-telemetry#26479) **Description:** A regression introduced in 0.82.0 means that the process scraper doesn't properly respect the `root_path` configuration key when it comes to reading process information. **Link to tracking Issue:** Fixes open-telemetry#24777 --------- Co-authored-by: Pablo Baeyens <[email protected]>
Component(s)
receiver/hostmetrics
What happened?
I am using the
hostmetrics
process scraper running inside a Docker container on Linux. My receiver configuration is as follows:My docker container is set up in a docker-compose file as follows:
Previously I was using version 0.71 which did not have the
mute_process_exe_error
parameter, so I did not have it in the config at the time. When attempting to scrape processes I would receive the following error message for every process running on my machine:These are expected errors that have since been rectified with the
mute_process_exe_error
parameter. In particular the process names are reading/hostfs/proc/[pid]
which is the expected path since that is how I set up the bind mount.After updating from version 0.71 to 0.82, keeping everything in the otel config and the docker-compose file the same (except adding the
mute_process_exe_error
which I have set to false while troubleshooting this issue), I see the following error instead:Of note, the path it is looking at now is
/proc/[pid]
rather thanhostfs/proc/[pid]
, and the processes it finds are internal container processes (since all of the process names areotelcol-contrib
. For example pid 1 on my machine is the default Linux process /sbin/init). My guess is that the scraper is able to read all of the processes on the machine that have been mounted onto the docker container, but to get all of the process information it still goes to /proc (where the internal container processes are) instead of /hostfs/proc. If I mute the exe and name errors, the few metrics I get are for processes that are all labeledotelcol-contrib
with low pid's, which also makes me think these are process metrics from within the container itself.Collector version
v0.71.0, 0.82.0
Environment information
Environment
OS: Ubuntu 18.04
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: