Currently, Libvirt Inspector does not collect disk capacity, usage and allocation metrics. This feature can be added for Libvirt to monitor disk metrics : capacity, usage and allocation. It will help to manage disk resources for addition of Virtual Machinesusing same physical disk.
Implement the method ‘inspect_disk_info’ in Inspector for Libvirt. This method will return the disk capacity,usage and allocation per device. The values correspond to values monitored by domblkinfo command of Libvirt.
Add CapacityPollster which create sample :
Add PerDeviceCapacityPollster which create sample :
Add AllocationPollster which create sample :
Add PerDeviceAllocationPollster which create sample :
Add PhysicalPollster which create sample :
Add PerDevicePhysicalPollster which create sample :
In pipeline.yaml, if user is not having * in meters_sink then new meters disk.capacity, disk.allocation, disk.usage, disk.device.capacity, disk.device.usage and disk.device.allocation needs to be added
This feature will need testing for next two releases.
libvirt 0.8.1 and above.
Unit tests are required to test all the new pollsters at Libvirt. The new meters should be discoverable when listing ceilometer meters. Example : ceilometer meter-list
Added the following metrics in ceilometer/doc/source/measurements.rst and “measurement section” of http://docs.openstack.org/developer/ceilometer/measurements.html needs to be updated.
|disk.capacity||g||B||inst ID||n||1||Capacity of disk in B|
|disk.allocation||g||B||inst ID||n||1||Allocation of disk in B|
|disk.usage||g||B||inst ID||n||1||Usage of disk in B|
|disk.device.capacity||g||B||disk ID||n||1||Capacity per device of disk in B|
|disk.device.allocation||g||B||disk ID||n||1||Allocation per device of disk in B|
|disk.device.usage||g||B||disk ID||n||1||Usage per device of disk in B|