While a am a noob in python and pyvmomi, thru the help of stackoverflow and the pyvmomi sample I have been able to get most of the information I need from ESXi servers. I want to get all the stats at the lowest level they are keeped from perfManager. All the examples I seen deal with aggregating them over a time frame.
What I think I want to do is call query = vim.PerformanceManager.QuerySpec(maxSample=1,entity=host,metricId=[metricId],startTime=startTime,endTime=endTime)
with startTime and endTime as NULL or is python None? and then iterate thru what comes back I want to save the vm, datetime of the stat, the metricId and the value. Also is there a wild card for metricId that would give me all the meticId's or do I need to call once for each metric?
I also beleve if I was to call it again later with the last datetime as the startTime and endTime as null I should get all the new stats since the last set I save? Is this correct?