# Metricbeat docker.network\_summary does not work from within a container?

**URL:** https://discuss.elastic.co/t/metricbeat-docker-network-summary-does-not-work-from-within-a-container/339226
**Category:** Beats
**Tags:** docker, metricbeat
**Created:** [July 25, 2023, 8:25pm UTC](https://discuss.elastic.co/t/metricbeat-docker-network-summary-does-not-work-from-within-a-container/339226 "2023-07-25T20:25:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [July 25, 2023, 8:25pm UTC](https://discuss.elastic.co/t/metricbeat-docker-network-summary-does-not-work-from-within-a-container/339226/1 "2023-07-25T20:25:27Z")

</div>

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

```auto
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](https://discuss.elastic.co/t/docker-network-summary-does-not-take-hostfs-into-account/290677)

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.

---

<div class="post-metadata">

### Author: ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)
#### Post date: [August 1, 2023, 9:05am UTC](https://discuss.elastic.co/t/metricbeat-docker-network-summary-does-not-work-from-within-a-container/339226/2 "2023-08-01T09:05:53Z")

</div>

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](https://github.com/elastic/beats/issues/8685).

---

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [August 7, 2023, 3:33pm UTC](https://discuss.elastic.co/t/metricbeat-docker-network-summary-does-not-work-from-within-a-container/339226/3 "2023-08-07T15:33:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 4, 2023, 5:34pm UTC](https://discuss.elastic.co/t/metricbeat-docker-network-summary-does-not-work-from-within-a-container/339226/4 "2023-09-04T17:34:32Z")

</div>

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