evoila / collectsphere

Collectd Plugin for VMware vSphere
MIT License
55 stars 9 forks source link

restriction in collectd's type_instance variable #2

Closed ghost closed 9 years ago

ghost commented 9 years ago

When we dispatch the values to collectd, we set type_instance to

clustername."vm".vmname.countergroup.counterinstance.countername.unit

which can easily exceed the 63 character limitation. See https://collectd.org/wiki/index.php/Naming_schema

NAAs and VMFS uuids are already shortened introducing the probablity of collision. When monitoring vCloud Director controlled VMs we regularly exceed that limit as VMs are named in the

(<35 character uuid>) pattern. The only idea I have to solve this is to detect this naming pattern and shorten the uuid to e.g. 6 characters as we do with NAAs and VMFS uuids. Any ideas?
ghost commented 9 years ago

I introduced better handling of the situation in commit 1533db912b31ca3f076547c5c5e78993676347ee at the expense of a probability of naming collisions.