Hi everyone,
I'm using node-exporter on network-centric devices (routers, switches, etc) and would like to have an option add certain annotations to certain metrics that belong to network interfaces.
This would be meta-data indicating things like:
- name of remote device
- name of remove interface
- role of remote device
- location of remote device
- customer id
- etc. pp.
I've implemented a PoC that matches a netdev's name and adds a list of labels to the netdev's metric. The configuration is stored in a yaml file like this:
netdev:
- name: "wlp0s20f3"
labels:
type: "lan"
role: "internal"
- name: "wg0"
labels:
type: "wifi"
role: "untrusted"
This could also be extended to cover block devices as well.
Opinions?
Kind Regards
takt