[Metricbeat] system module don't log "error fetching PID metrics for XXX processes" when non-root
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 15m
- Merged PRs (30d)
- 385
Description
**Describe the enhancement:**
Metribeat when collecting system metrics, if it fails to fetch information about PIDs it'll log:
```
"message": "Error fetching data for metricset system.process: non fatal error; reporting partial metrics: error fetching PID metrics for XXX processes, most likely a \"permission denied\" error. Enable debug logging to determine the exact cause.",
```
We have reports that running the Elastic Agent with the system integration will contantly, every metricset fetch, log the error above and it's too verbose.
It also pollutes the "Concerning Agents" dashboard as it looks for warning and error logs:
**Describe a specific use case for the enhancement or feature:**
Metricbeat, or all beats, could detect they're running in unprivileged mode or as non-root and omit similar logs from the system integration.
Contributor guide
Research direction
Start with Metricbeat's system module and the system.process metricset, reproducing collection as a non-root user to observe the repeated permission-denied logging. Trace where the PID metrics error is reported and check the existing debug-versus-warning behavior. Done means unprivileged collection no longer emits the repeated error while useful diagnostics remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100