knife-vsphere icon indicating copy to clipboard operation
knife-vsphere copied to clipboard

Retrieval of PerformanceManager for all Virtual Machines

Open petericebear opened this issue 8 years ago • 2 comments

Hi,

I have found this example: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/vm_perf_example.py

What I am trying to achieve is to get all information from the tab performance manager. The statistics are for:

  • cpu
  • memory
  • bandwidth
  • disk usage

If I can fetch the data from the realtime information that is updated every 20 seconds, then we can process it in Elasticsearch for future usages.

petericebear avatar Aug 10 '17 08:08 petericebear

That's neat, I wonder if it would be appropriate for the knife vsphere vm find command, such as to add a flag that also captures performance info.

How well do you think this would perform? I can't iterate over all my VMs in 3 minutes let alone 20 seconds :(

swalberg avatar Aug 10 '17 12:08 swalberg

Retrieval of all stats from the DB should be fast. As long as you don't have to query the database. I believe stats from the last hour it is almost instant.

Would be neat to get it working in first place. Can check out the speed afterwards. We have under thousand servers so maybe the speed won't be a thing.

petericebear avatar Aug 16 '17 11:08 petericebear