compose
compose copied to clipboard
Assign container name to /sys/class/net//ifalias in docker compose
Description
Using node exporter, I'd like to be able to extract a container name from the container's virtual interface 'ifalias' data. I use node exporter to do this for other '/sys/class/net/' docker network metrics and a typical metric looks like this:
node_network_info{address="02:99:00:90:03:b2",adminstate="up",broadcast="ff:ff:ff:ff:ff:ff",device="vethfe8c6f3",duplex="full",ifalias="",operstate="up"} 1
The ifalias field is currently empty for both the metric and the ifalias file on the host for my docker containers. I'd like to be able to assign the container name to this field.