I am looking to gather performance data from the vCenter database. Specifics like CPU % or ghz used, RAM % or gbs used, and HDD free space vs used space (IOPs or disk latency as a bonus). I assumed gathering this data from the database is the best option, as I am SQL Server DBA, and it is something they want to report on regularly. I did see a way to gather this with PowerCLI, but that process seems clunky to do regularly and import it into a second DB, if the data already exists in the primary database. I have found numerous blog/forum postings where people are looking to do this same thing, so this could be big win for the VMware community. Really appreciate any assistance! I am happy to do the leg work if someone can point me in the right direction.
FWIW; this link got me started down the right track: Querying the VMware vCenter Database (VCDB) for Performance and Configuration Information - Jonathan...
But as a commenter mentioned, the data for memory and CPU seems off:
Can anyone suggest the best way to get VM CPU and memory consumption.
I accessed the Daily/weekly/Monthly/yearly history stats and look for stat_name ‘usage’ and ‘consumed’. According to documentation
• Consumed = Amount of guest physical memory consumed by the virtual machine for guest memory. Consumed memory does not include overhead memory. It includes shared memory and memory that might be reserved, but not actually used.
• Usage = Memory usage as percentage of total configured or available memory. active ÷ virtual machine configured size
While ‘consumed’ stat_value is consistent , ‘usage’ stat_value seems completely inconsistent — see below:
SAMPLE_TIME STAT_ID STAT_NAME STAT_GROUP STAT_ROLLUP_TYPE ENTITY STAT_VALUE
3/25/14 0:00 16 usage mem average vm-131 940
3/25/14 0:00 90 consumed mem average vm-1312 4192903
3/25/14 0:00 16 usage mem average vm-1316 196
3/25/14 0:00 90 consumed mem average vm-1316 2094434
the numbers 940 and 196 cannot be right if these are to be interpreted as percentage.
Thanks for the response. I have used this before, and that does get me close. It has the disk information, but it is lacking on the CPU/RAM usage. Those are the important ones. Do you know how to gather that?
I see many have tried but lacking CPU/RAM usage specifically. I guess the query used in above blog can give clue to CPU and memory tables n views. At the moment I don't have vCenter with SQL DB so I cant dig up. Will check and let you know if find something.