HI, all Today I try to add a new pollster plugin in ceilometer-agent-compute to collect vmware virtual machines's disk usage rate.
After researched the vmware docs: https://www.vmware.com/support/developer/converter- sdk/conv61_apireference/disk_counters.html#usage I think I can call the vsphere inspector get the counter capacity.provisioned and capacity.usage. Then I can get the virtual machine's disk usage rate via: disk_util = capacity.usage/capacity.provisioned *But, when I add a new function in vsphere inspector like below, It cannot get any data from vcenter:* My example code like this: ceilometer.compute.virt.vmware.inspector.VsphereInspector#inspect_disks ========================================================================= def inspect_disks(self, instance, duration=None): vm_moid = self._ops.get_vm_moid(instance.id) if not vm_moid: raise virt_inspector.InstanceNotFoundException( _('VM %s not found in VMware vSphere') % instance.id) VC_DISK_PROVISIONED_CNTR = "disk:capacity.provisioned:average" disk_counter_id = self._ops.get_perf_counter_id(VC_DISK_PROVISIONED_CNTR ) disk_infos = self._ops.query_vm_aggregate_stats(vm_moid, mem_counter_id, duration) print “The disk info is:%s” % disk_infos ============================================================================ The disk_infos is empty. I try to use these functions to query the counter value: self._ops.query_vm_device_stats(vm_moid, disk_counter_id, duration) self._ops.query_vm_aggregate_stats(vm_moid, mem_counter_id, duration) *But cannot get any data from vcenter, and I'm sure the vcenter service is correct in my env.* *Does anyone know what's wrong with my code? * *Or is there any other solutions for my requirement.* Thanks~ == MengAlong
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev