Beats: Monitoring: allow specifying /proc or hostfs path.

Created on 23 Dec 2020  路  3Comments  路  Source: elastic/beats

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.

Services discuss enhancement help wanted libbeat

Most helpful comment

This definitely seems like a bug. Might be an easy fix, gonna poke around.

All 3 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ycombinator picture ycombinator  路  3Comments

gmoskovicz picture gmoskovicz  路  4Comments

pigletfly picture pigletfly  路  3Comments

feelan03 picture feelan03  路  3Comments

andrewkroh picture andrewkroh  路  3Comments