-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Metricbeat generates large and repetitive permission error logs #41890
Metricbeat generates large and repetitive permission error logs #41890
Comments
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Here, in
I'm guessing that should be |
I agree. If we're having partial metrics, log it a debug level. |
Even if we're logging at a debug level, the log is huge. I'll work on narrowing it down. Maybe something like:
|
It is always possible for that error to be every PID on the machine. So maybe something like |
This is to reduce the log pollution in default case. If the user is interested to view the full log, they can enable "debug" logging. Closes elastic/beats#41890
logs looks like this now {"log.level":"error","@timestamp":"2024-12-12T13:59:11.076+0530","log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).handleFetchError","file.name":"module/wrapper.go","file.line":324},"message":"Error fetching data for metricset system.process_summary: non fatal error; reporting partial metrics: error fetching PID metrics for 316 processes, most likely a \"permission denied\" error. Enable debug logging to determine the exact cause.","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2024-12-12T13:59:16.308+0530","log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).handleFetchError","file.name":"module/wrapper.go","file.line":324},"message":"Error fetching data for metricset system.process: non fatal error; reporting partial metrics: error fetching PID metrics for 316 processes, most likely a \"permission denied\" error. Enable debug logging to determine the exact cause.","service.name":"metricbeat","ecs.version":"1.6.0"} |
Elastic agents versions 8.17 and 8.16 are all affected. |
@VihasMakwana was the elastic-agent-system-metrics package updated in main+8.17+8.16 with this? If not, we should re-open the issue until that is done. Merging the PR into the system metrics package doesn't fix this by itself. |
Backports are now merged. |
Closing this as the |
Here is an example:
Here is an additional screenshot indicating that these errors can become ludicrously large in some circumstances:
It looks like we might be reporting the same error for every single PID on the system. We need to report the general error a single time instead.
The text was updated successfully, but these errors were encountered: