-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFE] Export certain network routes (e.g. default) #1639
Comments
A couple comments.
|
Good question! It should "just work". My current implementation is equivalent to executing
Netlink for linux, yes. The BSDs have a similar mechanism. Neither requires root. I still have to figure out how to stub this out for testing. |
Annoyingly, |
While it's a borderline case of whether this is really a monitoring metric, I see how it's useful. Especially for using this metric to decide which interface to use in graphs etc. So yeah seems reasonable. |
This has been added to #1811 |
woot woot! Thanks for the cleanup. |
(I intend to implement this, and I have a functioning patch for Linux already, but I'd like to discuss exactly how this should look before filing the PR)
Goal:
Write alerts that detect, for example, that a node's uplink network interface is nearing saturation.
Challenge:
Modern Linux boxes, especially with containers, have lots of network interfaces, and you can't count on the uplink being called
eth0
(see systemd.net-naming-scheme).It would be useful for the node exporter to indicate which network interface has the default route. This is a pretty reasonable proxy for the "uplink" interface.
Proposal:
The simplest solution is to add an additional label (per family) to the
node_network_info
metric, so it looks something likenode_network_info{address="01:01:01:01:01:01",broadcast="ff:ff:ff:ff:ff:ff",default_route_v4="1",default_route_v6="1",device="eth0",duplex="full",ifalias="",operstate="up"}
Alternatively, we could allow for more flexibility. I could see wanting to expose which interface has a route to a specific IP address. For example, I could see wanting know which interface is the SAN interface. So, I'd configure the node-exporter with the destination 1.2.3.4 as "san" and get the following metrics:
The text was updated successfully, but these errors were encountered: