Summary
Prometheus node_exporter includes an optional network_route collector that exports the entries in the routing table. Add a configuration option to enable this collector, something like
set service monitoring prometheus node-exporter collectors network_route
When this option is enabled, add --collector.network_route to the node_expoter args.
Use case
I'd like to set up Prometheus alerts that fire when on a failover link. This feature would let me monitor the status of routes managed by set protocols failover route. I believe it would also let me determine which route has been selected by routing protocols like OSPF.
Additional information
The routing table can be very large in some configurations, so network_route shouldn't be enabled by default.
See also https://github.com/prometheus/node_exporter/pull/1811 for some additional details. This feature was added to node exporter 1.1.0 (February 2021).