4.3 ClusterCPUUsage

Use this Knowledge Script to monitor the CPU usage of the cluster. This script raises an event if CPU usage exceeds the threshold you set. In addition, this script generates data streams for CPU usage. This script monitors and collects data for the following performance metrics:

  • CPU usage as a percentage: the sum of actively used CPU of all virtual machines in the cluster, as a percentage of the total available CPU.

  • CPU usage in MHz: the sum of actively used CPU of all virtual machines in the cluster, in megahertz.

NOTE:The VirtualCenter_ClusterCPUUsage Knowledge Script does not return valid values for VMware vSphere 4.0. When you run the this Knowledge Script, the values returned do not match the values displayed in the Advanced Performance Charts in the vSphere client. This issue does not occur with versions of VMware vSphere later than version 4.0.

4.3.1 Prerequisite

To enable the Knowledge Script to collect accurate CPU usage data, set the following Statistics Collection Intervals appropriately in the vCenter Management Server Configuration:

  • Collection Frequency: The interval duration in vCenter must be less than or equal to the AppManager job interval schedule. For example, if you run the VirtualCenter_ClusterCPUUsage Knowledge Script at 15-minute intervals, the interval duration in vCenter must be less than or equal to 15 minutes.

For more information about setting the Interval Duration and Statistics Level in vCenter, see the VMware Virtual Infrastructure 3 documentation.

4.3.2 Resource Object

vSphere cluster

4.3.3 Default Schedule

By default, this script runs every 15 minutes.

4.3.4 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event Notification

Raise event when percent CPU usage exceeds the threshold?

Select Yes to raise an event if the percentage of CPU usage exceeds the threshold you set. The default is unselected.

Event severity when percent CPU usage exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the percentage of the CPU usage exceeds the threshold. The default is 15.

Raise event when CPU usage in MHz exceeds the threshold?

Select Yes to raise an event if CPU usage in MHz exceeds the threshold you set. The default is Yes.

Event severity when CPU usage in MHz exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which CPU usage in MHz exceeds the threshold. The default is 15.

Raise event when CPU metrics are not available?

Select Yes to raise an event if the CPU metrics are not available. The default is Yes.

Event severity when CPU metrics are not available

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to retrieve metrics from vCenter. The default is 15.

Event severity when AppManager failed to get metrics

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to retrieve metrics from vCenter. The default is 15.

Event severity when AppManager failed to log in

Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager failed to log in to vCenter. The default is 5.

Event severity when the ClusterCPUUsage job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the ClusterCPUUsage job fails unexpectedly. The default is 5.

Data Collection

Collect data for percent CPU usage?

Select Yes to collect data about the percentage of CPU usage for charts and reports. The default is unselected.

Collect data for CPU usage in MHz?

Select Yes to collect CPU usage data in MHz for charts and reports. The default is unselected.

Monitoring

Maximum threshold for CPU usage

Specify the maximum amount of CPU usage that can occur before an event is raised. The default is 80 percent.

Maximum threshold for CPU usage

Specify the maximum amount of CPU usage that can occur before an event is raised. The default is 800 MHz.