Metricbeat docker.network_summary does not work from within a container?

So, judging from this error I've been getting today:

lanewell-metricbeat-app  | {"log.level":"error","@timestamp":"2023-07-25T20:06:51.398Z","log.origin":{"file.name":"module/wrapper.go","file.line":263},"message":"Error fetching data for metricset docker.network_summary: error fetching namespace for PID 1008812: error reading network namespace link: readlink /proc/1008812/ns/net: no such file or directory","service.name":"metricbeat","ecs.version":"1.6.0"}

and Docker.network_summary does not take hostfs into account

Am I right in assuming that Metricbeat still doesn't support getting network info when it is running inside a container?

As in, I have a Metricbeat container running with the docker socket bind mounted, and / bind mounted to /host. But as far as I can tell, there is no configuration to tell Metricbeat that it should look in /host for it's info. (Like you can with linux module, for example.)

Is there an existing feature request somewhere I can watch? I didn't find anything when I looked in the github repo.

Hi,

Yes, I think that at the moment the only option is to run the container with the host network mode, but it should be possible to obtain the info from procfs.

There was a related issue that was closed as stalled, it mentioned docker swarm, but the problem is the same. I have reopened it Metricbeat host network monitor over docker swarm · Issue #8685 · elastic/beats · GitHub.

I was planning on deploying to Docker Swarm. So, yeah, host mode probably won't work.

I had found that issue, but it was closed. Thanks for reopening it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.