-
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/scrapers/process] - "error reading username for process x... unknown userid y" when user not found in /etc/passwd #17187
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
After looking through the code I suspect that the error is being returned by Go stdlib Should a process scrape fail because we can't get a valid Username from a UID? |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
Pinging code owners for receiver/hostmetrics: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
We face the same issue. We would prefer having a metrics, even if the username can't be resolved. |
What would you like instead? Just the UID? An empty string? |
Just the UID would be better than nothing. Ideally, the username gets looked up in sssd. |
Yes - that works for me |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
So how to resolve this? I just want to get metrics from different machine: 2023-08-07T00:31:28.239-0700 error scraperhelper/scrapercontroller.go:214 Error scraping metrics {"kind": "receiver", "name": "hostmetrics", "pipeline": "metrics", "error": "error reading parent pid for process \"systemd\" (pid 1): invalid pid 0", "scraper": "process"}
go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).scrapeMetricsAndReport
go.opentelemetry.io/collector@v0.66.0/receiver/scraperhelper/scrapercontroller.go:214 |
…mute `error reading username for process` (open-telemetry#28661) **Description:** add configuration option `mute_process_user_error`) to mute `error reading username for process` **Link to tracking Issue:** * open-telemetry#14311 * open-telemetry#17187 Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
…mute `error reading username for process` (open-telemetry#28661) **Description:** add configuration option `mute_process_user_error`) to mute `error reading username for process` **Link to tracking Issue:** * open-telemetry#14311 * open-telemetry#17187 Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Component(s)
receiver/hostmetrics
What happened?
Description
Attempting to collect per-process metrics fails as no Username can be found for a given PID's UID.
Steps to Reproduce
Enabling the collection of per-process metrics via the following config (and running as root):
Expected Result
Production of per-process metrics
Actual Result
No per-process metrics are created.
Collector version
v0.60.0
Environment information
Environment
OS: CentOS Linux release 7.9.2009 (Core)
OpenTelemetry Collector configuration
Log output
Additional context
Using an ActiveDirectory-based authentication system via
sssd
which means that a local user account may not exist for a logged-in user. Running the Collector asroot
i.e. not the UID that is failing lookupThe text was updated successfully, but these errors were encountered: