add route table and route type label#2728
Open
derrickhayashi wants to merge 2 commits intoprometheus:masterfrom
Open
add route table and route type label#2728derrickhayashi wants to merge 2 commits intoprometheus:masterfrom
derrickhayashi wants to merge 2 commits intoprometheus:masterfrom
Conversation
6e5947f to
2be4244
Compare
Signed-off-by: Derrick Hayashi <derrickhayashi@gmail.com>
Signed-off-by: Derrick Hayashi <derrickhayashi@gmail.com>
8c9c2d4 to
582d275
Compare
SuperQ
requested changes
Sep 11, 2023
Comment on lines
+232
to
+233
| rt_tablesConfigFile := "/etc/iproute2/rt_tables" | ||
| rt_tablesConfigDir := "/etc/iproute2/rt_tables.d" |
Member
There was a problem hiding this comment.
These paths should be set as flags to make them configurable.
This allows users to change the paths, as well as we can then setup fixtures for the end-to-end tests.
--collector.network_route.config.file
--collector.network_route.config.dir
|
Is there any update on this PR? Lack of table id makes the network_route collector much less useful with multiple routing tables, especially for monitoring default routes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds labels to show the route table for a particular route as well as the route type.
On a router, it is common to use different route tables to differentiate and isolate networks (known as VRFs in the networking world) for multiple tenants. The original PR does not seem to differentiate between different route tables (no response to #1811 (comment)) so this PR adds this feature. It also looks up the route table id to a user friendly name as defined in rt_tables config.
Also, "blackhole" route types are a route to ensure that packets destined for networks which the router is not able to route to do not keep propagating. On Linux, there are two options to do this, either through the route type of "blackhole", which silently discards the packet, or "unreachable", which sends an ICMP unreachable message.
On a device functioning as a router, it is usable to be able to monitor and identify these routes and types.
Example output