Skip to content

node_exporter running as container collects network statistics from container interfaces #581

@TomHutter

Description

@TomHutter

Host operating system: output of uname -a

Linux domo 4.9.0-0.bpo.2-amd64 #1 SMP Debian 4.9.18-1~bpo8+1 (2017-04-10) x86_64 GNU/Linux

node_exporter version: output of node_exporter -version

node_exporter, version 0.14.0 (branch: master, revision: 840ba5d)
build user: root@bb6d0678e7f3
build date: 20170321-12:12:54
go version: go1.7.5

Are you running node_exporter in Docker?

Yes. Have only found README.md, which does not mention this bug.

What did you do that produced an error?

What did you expect to see?

Network statistics of the host

What did you see instead?

Network statistics of the container

netdev_linux.go works with procFilePath("net/dev"). /host/proc/net is a soft link to /host/proc/self/net (net -> self/net). Therefore the statistics get collected from the devices of the /bin/node_exporter process.

Alternatively the statistics could be collected from /host/sys/class/net, which are the statistics of the host devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions