I need metricbeat's system process metricset to report current working directory (cwd).
I have a fork at https://github.com/mcenirm/beats/tree/report_cwd (based on v5.2.1) that passes tests https://travis-ci.org/mcenirm/beats/builds/202678818
It was straightforward to use gosigar's ProcExe, at least for linux. I had to skip the test on darwin since gosigar doesn't get cwd, and libproc.h is not a public interface anyway. I have not checked freebsd and windows.