To start, ultimately, I want these (among other metrics which I have already written the script to collect) to go into a CSV file.
I would like to grab the names of the datacenters, and then the number of hosts and VMs in each. There isn't any built in metric for any of those... spitting out the datacenter names is a matter of grabbing them, but how can I get the number of hosts and VMs in each datacenter? Is the best way with some sort of funky (I'd guess for) loop?
Also, is there an easy way to only grab certain metrics (performance counters)? Like if I wanted to ONLY grab the total CPU usage what is the best way to approach that without letting the user specify in the opts?
Sorry if some of these questions are horrible, I just started working with vMA and I may not completely understand the API yet... haven't finished all the documentation (there seems to be quite a lot of it!).