Thursday, 15 March 2012

powershell - Get-stat equivalent via VMWare vSphere API -



powershell - Get-stat equivalent via VMWare vSphere API -

i'm developing application requires frequent access info provided through powercli get-stat command, , continuously interfacing powershell has proven slow.

we've been looking through vmware vsphere, have had little success when comes finding method provides equivalent information. have managed access virtualmachine object, not appear provide clear access stats.

is there proper way access stats api? or should focus on optimising powershell interaction instead, parsing resulting output?

if not using vmware get-stat. can use:

direct vsphere access db performance stats.

try like:

select [sample_time] ,[sample_interval] ,[stat_id] ,[stat_name] ,[stat_group] ,[stat_rollup_type] ,[counter_id] ,[entity] ,[device_name] ,[device_type_name] ,[stat_value] [vsp02].[dbo].[vpxv_hist_stat_daily]

take @ utilize powershell create sql querys: https://sorrycantdothat.wordpress.com/category/sysadmin/

connect each vm's wmi , collect performance stats.

powershell vmware vsphere powercli

No comments:

Post a Comment