<div dir="ltr">HI,gord<div><br></div><div>Thanks for your infomation.</div><div>But I think vmware driver already support my requirement because It's docs indicate it's already support the counter.</div><div>Maybe just the vsphere inspector in ceilometer haven't implement the interface or we need add some other configuration in ceilometer.</div><div>So, is there any one know something about vsphere inspector in ceilometer can give me some advice?</div><div>And I'll try to contact some developers on vmware driver for some help.</div><div><br></div><div>MengAlong</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 29, 2017 at 8:58 PM, gordon chung <span dir="ltr"><<a href="mailto:gord@live.ca" target="_blank">gord@live.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">i'll be honest, i don't think any of the active developers on Ceilometer<br>
uses or knows anything about vmware driver. you will probably want to<br>
reach out to vmware themselves so they can provide support or fix the<br>
driver (or ideally move the vmware driver to their own repo).<br>
<span class=""><br>
On 28/06/17 10:34 AM, Along Meng wrote:<br>
><br>
> HI, all<br>
><br>
> Today I try to add a new pollster plugin in ceilometer-agent-compute to<br>
> collect vmware virtual machines's disk usage rate.<br>
><br>
> After researched the vmware docs:<br>
> <a href="https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/disk_counters.html#usage" rel="noreferrer" target="_blank">https://www.vmware.com/<wbr>support/developer/converter-<wbr>sdk/conv61_apireference/disk_<wbr>counters.html#usage</a><br>
> <<a href="https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/disk_counters.html#usage" rel="noreferrer" target="_blank">https://www.vmware.com/<wbr>support/developer/converter-<wbr>sdk/conv61_apireference/disk_<wbr>counters.html#usage</a>><br>
><br>
> I think I can call the vsphere inspector get the<br>
> counter capacity.provisioned and capacity.usage.<br>
> Then I can get the virtual machine's disk usage rate via: disk_util<br>
> = capacity.usage/capacity.<wbr>provisioned<br>
><br>
</span>> *But, when I add a new function in vsphere inspector like below, It<br>
> cannot get any data from vcenter:*<br>
<span class="">> My example code like this:<br>
><br>
> ceilometer.compute.virt.<wbr>vmware.inspector.<wbr>VsphereInspector#inspect_disks<br>
> ==============================<wbr>==============================<wbr>=============<br>
> def inspect_disks(self, instance, duration=None):<br>
</span>> vm_moid = self._ops.get_vm_moid(<a href="http://instance.id" rel="noreferrer" target="_blank">instance<wbr>.id</a> <<a href="http://instance.id/" rel="noreferrer" target="_blank">http://instance.id/</a>>)<br>
<span class="">> if not vm_moid:<br>
> raise virt_inspector.<wbr>InstanceNotFoundException(<br>
> _('VM %s not found in VMware vSphere') % <a href="http://instance.id" rel="noreferrer" target="_blank">instance.id</a><br>
</span>> <<a href="http://instance.id/" rel="noreferrer" target="_blank">http://instance.id/</a>>)<br>
<span class="">><br>
> VC_DISK_PROVISIONED_CNTR = "disk:capacity.provisioned:<wbr>average"<br>
> disk_counter_id =<br>
> self._ops.get_perf_counter_id(<wbr>VC_DISK_PROVISIONED_CNTR)<br>
> disk_infos = self._ops.query_vm_aggregate_<wbr>stats(vm_moid,<br>
> mem_counter_id, duration)<br>
> print “The disk info is:%s” % disk_infos<br>
> ==============================<wbr>==============================<wbr>================<br>
><br>
> The disk_infos is empty.<br>
><br>
> I try to use these functions to query the counter value:<br>
> self._ops.query_vm_device_<wbr>stats(vm_moid, disk_counter_id, duration)<br>
> self._ops.query_vm_aggregate_<wbr>stats(vm_moid, mem_counter_id, duration)<br>
><br>
</span>> *But cannot get any data from vcenter, and I'm sure the vcenter service<br>
> is correct in my env.*<br>
><br>
> *Does anyone know what's wrong with my code? *<br>
> *Or is there any other solutions for my requirement.*<br>
><br>
> Thanks~<br>
><br>
> ==<br>
> MengAlong<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
gord<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
</font></span></blockquote></div><br></div>