This adds a GetOneRootEvent(). method to ProcStats we need this for https://github.com/elastic/elastic-agent/issues/4083 , as that issue requires metricbeat's system/process metricset to monitor a specific PID, which it can't do now. This will have to be followed up with a change to beat itself to rope this in. This also cleans up a bit of code and adds some docs.
What does this PR do?
This is part of https://github.com/elastic/elastic-agent/issues/4083
This adds a
GetOneRootEvent()
. method toProcStats
we need this for https://github.com/elastic/elastic-agent/issues/4083 , as that issue requires metricbeat's system/process metricset to monitor a specific PID, which it can't do now. This will have to be followed up with a change to beat itself to rope this in. This also cleans up a bit of code and adds some docs.Why is it important?
needed for https://github.com/elastic/elastic-agent/issues/4083
Checklist
CHANGELOG.md