prometheus / prometheus/node_exporter
Network namespace awareness
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Currently node_exporter silently ignores network namespaces.
Steps to reproduce:
modprobe dummy
At this point you should see a dummy0 interface being exported by node_exporter.
ip netns add test
ip link set dummy0 netns test
Actual behavior: The interface is gone.
Expected behavior: The interface is still listed.
This also applies to all the netstat metrics - they are different between network namespaces and should be exported as such.
To make this nice maybe node_exporter could have a label which network namespace the metric belongs to? Alternatively support querying a given network namespace would also work but not be as nice.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the listed dummy interface and network-namespace commands, then trace the node_exporter collectors responsible for interface and netstat metrics. Done means interfaces and namespace-specific netstat metrics remain exported after dummy0 moves into the test namespace, with a clear namespace distinction or supported namespace-query behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- networking, observability
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100