When using docker.network_summary, I have the following error:
2021-12-01T13:56:00.159Z INFO module/wrapper.go:266 Error fetching data for metricset docker.network_summary: error fetching namespace for PID 4359: error reading network namespace link: readlink /proc/4359/ns/net: no such file or directory
PID 4359 comes from the host and is available in /hostfs mount:
sh-4.2# ll /hostfs/proc/4359/ns/net
lrwxrwxrwx. 1 root root 0 Dec 1 13:55 /hostfs/proc/4359/ns/net -> net:[4026531956]
I am not expert in Go but it seems like the hostfs is not taken into account into metricbeat/module/docker/network_summary/helper.go at line 81
My guess is that something like nsLink, err := os.Readlink(filepath.Join(paths.Hostfs, "/proc/", fmt.Sprintf("%d", pid), "/ns/net")) would fix the issue with the addition of "github.com/elastic/beats/v7/libbeat/paths" import
Should I create the issue on github ?