Previously, we weren't passing errors to the caller while monitoring set of processes.
With the recent introduction of the status reporter for metricsets, it is impossible to change the status to degraded if such errors are not passed to the caller.
Fix this by passing errors to the caller. We also populate the process related information to our best-effort.
Checklist
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added tests that prove my fix is effective or that my feature works
What does this PR do?
Checklist
CHANGELOG.md
Manual testing and general information
metricbeat
NOTE:system/process
moduleSteps:
errors.Is(err, NonFatalErr{}))
on received errorGenreal info related to the changes in this PR:
no process found
,)not enough privileges
).