elastic / elastic-agent-system-metrics

Apache License 2.0
0 stars 22 forks source link

Add GetOneRootEvent method to process handler #150

Closed fearful-symmetry closed 1 month ago

fearful-symmetry commented 2 months ago

What does this PR do?

This is part of https://github.com/elastic/elastic-agent/issues/4083

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.

Why is it important?

needed for https://github.com/elastic/elastic-agent/issues/4083

Checklist