[openstack-dev] [telemetry][ceilometer]Cannot get vmware virtual machine's disk usage rate via vsphere inspector
Along Meng
alongmeng at gmail.com
Thu Jun 29 14:15:45 UTC 2017
HI,gord
Thanks for your infomation.
But I think vmware driver already support my requirement because It's docs
indicate it's already support the counter.
Maybe just the vsphere inspector in ceilometer haven't implement the
interface or we need add some other configuration in ceilometer.
So, is there any one know something about vsphere inspector in ceilometer
can give me some advice?
And I'll try to contact some developers on vmware driver for some help.
MengAlong
On Thu, Jun 29, 2017 at 8:58 PM, gordon chung <gord at live.ca> wrote:
> i'll be honest, i don't think any of the active developers on Ceilometer
> uses or knows anything about vmware driver. you will probably want to
> reach out to vmware themselves so they can provide support or fix the
> driver (or ideally move the vmware driver to their own repo).
>
> On 28/06/17 10:34 AM, Along Meng wrote:
> >
> > 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
> > <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 <http://instance.id/>)
> > if not vm_moid:
> > raise virt_inspector.InstanceNotFoundException(
> > _('VM %s not found in VMware vSphere') % instance.id
> > <http://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
>
> --
> gord
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170629/3974083a/attachment.html>
More information about the OpenStack-dev
mailing list