elastic / gosigar

Gathers system and per process statistics
Apache License 2.0
105 stars 76 forks source link

cgroup: add option to override the /sys/fs/cgroup hierarchy #148

Closed axw closed 3 years ago

axw commented 3 years ago

When running in Docker, paths in /proc/<pid>/cgroup do not correspond to the paths under /sys/fs/cgroup/<subsystem>/...

Instead, the root /sys/fs/cgroup/<subsystem> should be used there. Provide an option for overridding the path, similar to https://github.com/elastic/elasticsearch/pull/22757.

I added NewReaderOptions/ReaderOptions to avoid breaking the API, and to minimise breakage in the future.

Required for https://github.com/elastic/beats/issues/22844

andresrc commented 3 years ago

ping @elastic/integrations-services