Discuss thread: https://discuss.elastic.co/t/metricbeat-k8s-error-getting-group-status-open-proc-pid-cgroup/255371
Since https://github.com/elastic/beats/pull/21113 monitoring includes cgroup stats. However, those are hardcoded to read from /proc. This clashes with use cases where proc is available in a different location and causes the following error to be printed to the logs every 30s:
ERROR instance/metrics.go:285 error getting group status: open /proc/33861/cgroup: no such file or directory
Metricbeat's system module has a command-line argument, -system.hostfs, that allows to specify an alternate path to the root filesystem for these metrics.
We could have a similar flag / configuration option for the monitoring metrics.
Pinging @elastic/integrations-services (Team:Services)
This definitely seems like a bug. Might be an easy fix, gonna poke around.
This is where it is hardcoded to "" (aka /):
https://github.com/elastic/beats/pull/21113/files#diff-2141c2342ca93ab304c2efd9425679f0f7ef598b9cdb9115213591671bc9c1a8R274
The first parameter of NewReader in "cgroups, err := cgroup.NewReader("", true)" should be confgiruable.
See also: https://github.com/elastic/gosigar/blob/master/cgroup/reader.go#L61
Most helpful comment
This definitely seems like a bug. Might be an easy fix, gonna poke around.