Skip to content

Can netdata map docker container networks of type macvlan? #16105

Answered by ilyam8
tkarls asked this question in Q&A
Discussion options

You must be logged in to vote

but it doesn't seem to be a "connection" on the host unique to each container as it does with the standard bridge interfaces

Yes. For mapping a veth interface (the host network namespace) to the container's interface we do the following:

  • find all double-linked interfaces in the host ns (iflink != ifindex).
  • find a process PID running inside the container
  • switch to the network ns of the PID.
  • find all double-linked interfaces in the container's net ns (iflink != ifindex).
  • find host net ns interfaces with host.ifindex == container.iflink && container.ifindex == host.iflink => these host interfaces mapped to the container.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tkarls
Comment options

@ilyam8
Comment options

Answer selected by tkarls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants