rverchere / vmware_exporter

VMWare VCenter Exporter for Prometheus
BSD 3-Clause "New" or "Revised" License
50 stars 31 forks source link

Unclear values for vmware_vm_cpu_usage_average metric #29

Open dannyk81 opened 6 years ago

dannyk81 commented 6 years ago

I can't quite figure out the values of vmware_vm_cpu_usage_average metric, for example:

vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz1"} | 202
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz2"} | 225
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz3"} | 4015
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz4"} | 207
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz5"} | 209

according to this https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/cpu_counters.html

The description of this counter is Amount of actively used virtual CPU, as a percentage of total available CPU, but the values I'm seeing do not seem like percentages.

Any clues?

dannyk81 commented 6 years ago

@rverchere

So, seems like dividing the value by 100 gets the correct result 😄 (compared to figures we see in vCenter)

Perhaps this is due to converting the value to float here: https://github.com/rverchere/vmware_exporter/blob/aeccb035d368dcc8e6bc52628d7eef786345725b/vmware_exporter/vmware_exporter.py#L386

dannyk81 commented 6 years ago

same issue with vmware_vm_mem_usage_average metric, need to divide by 100 the value to get correct result.

pryorda commented 6 years ago

This issue was moved to pryorda/vmware_exporter#3