VMware Cloud Community
AmritVaish
Contributor
Contributor

Javascript to capture CPU performance statistics of a cluster for last 7 days.

Hi all,

I am looking for javascript to check average performance statistics of CPU of cluster for last 7 days.

Please provide me javascript for this.

I have to use this  script in vRealize orchestrator to fetch average performance statistics of CPU of cluster for last 7 days.

Tags (1)
3 Replies
GayathriS
Expert
Expert

Check out this community link:
VMware PowerCLI Forum - VMware {code}

This has Average CPU values but hope this will be of some help

Please consider marking this answer as correct and helpful if this helps you.

regards

Gayathri

0 Kudos
iiliev
VMware Employee
VMware Employee

Hi,

There are some examples of Javascript code for collecting performance statistics in other threads here in this forum. Check, for example, https://communities.vmware.com/thread/419294​ and https://communities.vmware.com/thread/538010

The overall idea is quite straightforward. You need to obtain a reference to performance manager (instance of VcPerformanceManager scripting class) from your vCenter connection, and then use the performance manager's methods/properties (ie. queryPerf()) to retrieve the available metrics data.

AmritVaish
Contributor
Contributor

Hi Ilian Iliev,

Thanks for your assistance.

Please let me know how to use VcPerformanceManager scripting class in vRO to get required result.

Actually  i am new to this tool so need your guidance for this.

0 Kudos