compose icon indicating copy to clipboard operation
compose copied to clipboard

Assign container name to /sys/class/net//ifalias in docker compose

Open BuxtonCalvin opened this issue 1 year ago • 1 comments

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.

BuxtonCalvin avatar May 07 '24 04:05 BuxtonCalvin