VM Performance Summary with vRO

Share this:

Monitoring VM performance is important part of managing virtual infrastructure. There are many tools out there to help on that matter, but very often I find myself going via the performance charts of a certain virtual machine looking for something that can cause performance penalties. To get sufficient overview, usually I’m checking the 4 main suspects: CPU, Memory, Storage and Network. High utilization on those resources can lead to performance degradation due to limited host resources or SAN/LAN issues.

Even though the performance charts in the vSphere Web Client provide more than enough information (via the “Overview” or “Advanced” views) I wanted to add vRO into the equation. The example below will take as input parameters a virtual machine and a past time frame from predefined list. Then it will display summary of the VM in User Interaction element, giving the choice to select new time frame for the same VM.

• Preparation

Including all the code and explaining the attributes here will make the article way too big. Instead, you can find the workflow provided at the end. It contains comments and descriptions, making it easy to read.
The schema is showed below:
vm-perf-schema
As I already mentioned, the workflow takes two input parameters: VM and past time frame from predefined list. The rest of the workflow elements do as follows:

• User input to local – Scriptable task – writes the initially chosen past time interval into local variable, which is later used to circle back if new past time frame will be selected in Show Result dialog
• Get and Calculate – Scriptable task – the performance metrics are collected and calculated to prepare the output as attributes for the next element

Tip: Performance metrics are gathered via metric ID. To get a list with all metric IDs you can use the following:

var perfMgr = VcPlugin.allSdkConnections[0].perfManager;

for each (var pcounter in perfMgr.perfCounter) {
	System.log("ID: "+pcounter.key+" Summary: "+pcounter.nameInfo.summary);
}

• Show results – User Interaction – shows the values prepared from the previous task and provides the option to select different past time frame
• System error – Logs error, thrown by Get and Calculate, to System.log and exists the workflow
• Change time frame – Decision element – used to circle back to Get and Calculate if another past time frame is selected in the Show Result dialog. Otherwise exits the workflow

• Running the workflow

When run via vRO client, the Show result dialog, pops up by default. However, when the workflow is run via the vSphere Web Client, user interaction is required to display the Show results dialog.

Assumption: The workflow is associated with the Virtual Machine object in order to appear in the right click context menu

1. Right click on a VM and under “All vRealize Orchestrator Actions” choose “VM Performance Summary”
vmcontextmenu
2. Select past time frame
webclient-startworkflow
3. The workflow will be in “Waiting” state as it waits for user interaction. You can click on the workflow and then on the “Answer” button to display the Show results dialog
webclient-answerworkflow
4. From the Show result dialog you can select different time frame or to end the workflow
webclient-workflowresults
You’ll get summary for some of the key performance metrics at one place. This can help you identify which resource may be under contention and to focus your investigation in that direction.

Download the VM Performance Summary workflow.

The workflow can be edited to provide report via email, or to take actions based on the calculated results (i.e. vmotion or svmotion). It all depends on the use case and the desired results.

You’re doing it different way? Share it. Your ideas and comments are always welcome!

The following two tabs change content below.

Ivaylo Ivanov

Ivaylo has 5 years of professional IT experience. Most of it in server administration area, network and virtualization technologies. From 2014 he specializes in VMware products family. He holds VCIX6-DCV and VCP7-CMA certifications. vExpert 2016/2017

Latest posts by Ivaylo Ivanov (see all)

About Ivaylo Ivanov

Ivaylo has 5 years of professional IT experience. Most of it in server administration area, network and virtualization technologies. From 2014 he specializes in VMware products family. He holds VCIX6-DCV and VCP7-CMA certifications. vExpert 2016/2017
Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.