gnmic
gnmic copied to clipboard
Add support for NetBox target discovery
Rather than adding Netbox target discovery it would be best for HTTP target discovery to support Prometheus format input. This would allow to use existing APIs made for Prometheus for gnmic. In the case of Netbox, one is already made: https://github.com/FlxPeters/netbox-plugin-prometheus-sd. Also file target discovery could be changed to support Prometheus format discovery as well. Most likely best option is to just add an option in the config, where you can switch between Prometheus format or regular gnmic.
This is a good idea, I wasn't aware of the prometheus NetBox plugin.
It can be achieved by adding an optional template transformation to both HTTP and File target discovery.
Netbox (or any other source producing Prometheus http_sd format)
--> Prometheus Format
--> Template
--> gNMIc Format
.
But I think it still makes sense to add a separate NetBox target discovery mechanism using its native API.
I will add a separate issue for tracking the template/Prometheus http_sd format for HTTP and File target discovery.