[collectd] [PATCH] Stabilise interface names in libvirt plugin

Gianni Tedesco gianni at brightbox.co.uk
Mon Jan 25 13:47:59 CET 2010


Xen domain ID's are not stable across guest reboots. This means that
interface statistics aren't properly grouped together. The following
patch strips the domain ID from the interface names so that statistics
for a singles guests interfaces are always grouped together.

Xen interface names default to the format "vifXX.Y" where XX is the
domain ID and Y is the interface ID. The patch works by stripping the
"vifXX." from the interface name iff it conforms to the described naming

The patch assumes the interface naming scheme so not sure how portable
it is. Perhaps a better fix would be to use interface MAC addresses. It
appears that libvirt has no suitable interface for determining the
interface ID...

Please advise

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-ifnames-1.diff
Type: text/x-patch
Size: 2218 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100125/04ea013c/attachment.bin 

More information about the collectd mailing list