Beat Stats incorrectly reporting CPU Usage
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 15m
- Merged PRs (30d)
- 385
Description
When running Filebeat in a background job under Bash
`filebeat -e -c filebeat.yml & > /dev/null`
```
filebeat.inputs:
- type: filestream
enabled: true
paths:
- ./sample.log
output.elasticsearch:
hosts: ["http://localhost:9200"]
http.enabled: true
http.port: 5070
http.pprof.enabled: true
http.host: 0.0.0.0
```
When collecting the stats from the process on macos
the stats appears to be showing the cpu total for the parent pid, in this case bash, instead of for itself:
Contributor guide
Research direction
Start by reproducing the Filebeat background-job command under Bash with the provided filestream configuration on macOS, then inspect the process statistics exposed with http.enabled and http.pprof.enabled. Compare the reported CPU usage with Filebeat's own process rather than the parent shell; done means the stats identify and report the correct process CPU total.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, go
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100