Linux allows for an administratively set port description for network interfaces, this can be configured with iproute2 using ip link set dev eth0 alias "LAN interface". This is similar to IF-MIB::ifAlias or IF-MIB::ifDescr in the land of SNMP.
On Cumulus Linux platforms (a fork of Debian), ifupdown2 allows setting this as part of the /etc/network/interfaces file.
We (@sfmix) use this for noting which ports are peering participants, backhaul transport, and/or management. We're trying to avoid using the snmp_exporter, since the node_exporter is faster and meets 99% of our requirements. The goal is to filter based on regex of port description for these different used interface descriptions.
It looks like the netdev_linux code parses /proc/net/dev file for counters (at least from my horrible Go code parsing skills, or lack of). This data is present in /sys/class/net/eth0/ifalias.
Host operating system: output of uname -a
Linux switch02-sfo02 4.1.0-cl-6-amd64 #1 SMP Cumulus 4.1.33-1+cl3u11 (2018-01-04) x86_64 GNU/Linux
node_exporter version: output of node_exporter --version
node_exporter, version 0.15.2 (branch: HEAD, revision: 98bc64930d34878b84a0f87dfe6e1a6da61e532d)
build user: root@d5c4792c921f
build date: 20171205-14:50:53
go version: go1.9.2
node_exporter command line flags
./node_exporter --collector.bonding --collector.logind --collector.interrupts --collector.systemd --web.listen-address="100.64.0.7:9100"
Are you running node_exporter in Docker?
No
Linux allows for an administratively set port description for network interfaces, this can be configured with
iproute2using ip link set dev eth0 alias "LAN interface". This is similar toIF-MIB::ifAliasorIF-MIB::ifDescrin the land of SNMP.On Cumulus Linux platforms (a fork of Debian), ifupdown2 allows setting this as part of the
/etc/network/interfacesfile.We (@sfmix) use this for noting which ports are peering participants, backhaul transport, and/or management. We're trying to avoid using the snmp_exporter, since the node_exporter is faster and meets 99% of our requirements. The goal is to filter based on regex of port description for these different used interface descriptions.
It looks like the netdev_linux code parses
/proc/net/devfile for counters (at least from my horrible Go code parsing skills, or lack of). This data is present in/sys/class/net/eth0/ifalias.Host operating system: output of
uname -aLinux switch02-sfo02 4.1.0-cl-6-amd64 #1 SMP Cumulus 4.1.33-1+cl3u11 (2018-01-04) x86_64 GNU/Linuxnode_exporter version: output of
node_exporter --versionnode_exporter command line flags
./node_exporter --collector.bonding --collector.logind --collector.interrupts --collector.systemd --web.listen-address="100.64.0.7:9100"Are you running node_exporter in Docker?
No