0

Is it possible / intended to use a prom/node-exporter container to monitor the network traffic of the docker host? In my setup, all the host interfaces show up in node_network_iface_id but node_network_iface_id only has time series for the container's interfaces.

My docker-compose.yml looks like this:

networks:
    backend:
        driver: bridge
        internal: true
    outside:
        external: true

node-exporter:
        image: prom/node-exporter
        volumes:
           - /proc:/host/proc:ro
           - /sys:/host/sys:ro
           - /:/host:ro
        command:
           - '--web.listen-address=:9100'
           - '--path.procfs=/host/proc'
           - '--path.sysfs=/host/sys'
           - '--path.rootfs=/host'
           - --collector.filesystem.ignored-mount-points
           - "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
        restart: always
        networks:
           - backend

...
Ryan E.
  • 1
  • 1

1 Answers1

0

I don't know if this is an update to node_exporter as your question was a while ago but I'm monitoring node_network_transmit_bytes_total for this using the full query below and it works well.

rate(node_network_transmit_bytes_total {device=~"eth.",host=~"$Host"}  [1m]) * 8

Naturally there is the equivalent receive value.

Sam Foley
  • 86
  • 2
  • 7