Viewing and adding formulas
You can create formulas and use them in different analyses and in quick analyses.
The Formulas page in the TrueSight Capacity Optimization console, displays a list of the existing outofthebox and custom (userdefined) formulas, and enables you to define new ones. To access the Formulas page, click Administration > DATA WAREHOUSE > Formulas.
Overview of formulas
Formulas enable you to easily aggregate or scale metrics. You can change the scale factor to available metrics or to compute 'derived metrics' by using different options, such as:
 A count of events, absolute number
 Difference between subsequent samples
 Peak counter
The product provides you with some outofthebox formulas. With formulas that you define, called custom formulas, you can perform the following calculation and aggregation tasks:
 Perform calculations using basic arithmetic operators, using metrics from a single entity
 Perform calculations using metrics from a single entity and its parent
 Perform aggregation on metrics from children entities
 Perform aggregation on subresources (example: BYDISK_**) of a single entity
For example, you can create a formula to calculate the ratio of Powered On VMs over (Total Powered Off) + (Powered Off) VMs for virtual clusters or hosts.
Formulas versus metrics
Formulas are derived from metrics. While they share a lot of similarities, they differ in a few ways. The following table lists the similarities and differences:
Characteristic  Formulas  Metrics 

Can be used:
 
Analysis functions allowed:
 
Analysis function 'Correlation'  
Can be used in Optimizer Rules  
Can be used in Hierarchy Rules  
Stored in data warehouse^{1}  
Forecasted values and Statistic selection^{2}  
Available in PV tables 
^{1} Formulas are dynamically computed based on the input metrics, and hence their values are not stored in the data warehouse.
^{2} Statistic selection is applicable only when you store data in the data warehouse. For formulas, since the data is not stored, and the computation is carried out dynamically when it extracts the input metrics and then does the charting, Forecasted values and Statistic selection are not possible for formulas.
Fields and options on the Formulas page
The Administration > DATA WAREHOUSE > Formulas page displays a table with information about each formula. There are two types of formulas listed: Outofthebox and Userdefined or Custom formulas.
UI element  Description 

Formulas table  
Formula Name  Internal name of the formula generated by the system using the userdefined name. All custom formula names have a _C suffix. 
Formula Label  Userdefined name that is used as the label in charts and reports. 
Package  Denotes if the formula is inbuilt or custom. 
Actions on formulas  
Add formula  Click Add new formula. 
Edit formula  Click to edit a formula. You can edit only custom formulas. 
Delete formula  Click to delete a formula. You can delete only custom formulas that are not in use. You cannot delete outofthebox formulas. 
Outofthebox formulas
The following table provides details of the outofthebox formulas that are available with the product. You cannot modify these formulas.
Name^{1}  Internal Name  Description  Details  For Target Entity 

Cluster queue per processor  F_CLUSTER_QUEUE_PER_PROCESSOR  Calculates the queue length per processor for vSphere cluster  AVG (Host.CPU_READY)  vSphere cluster 
Memory Overcommitment  F_MEMORY_OVERCOMMITMENT  Calculates the memory overcommitment in percentage for the vSphere cluster and vSphere host.  SUM (VirtualMachine.TOTAL_REAL_MEM)/<Parent>.TOTAL_REAL_MEM


Spec used  F_SPEC_USED  Calculates the Spec used for the vSphere cluster  SUM (Host.BYBENCHMARK_VALUE[SPECINTRATE2006]) *Cluster.CPU_UTIL  vSphere cluster 
Spec configured  F_SPEC_CONFIGURED  Calculates the Spec configured for the vSphere cluster  SUM (Host.BYBENCHMARK_VALUE[SPECINTRATE2006])  vSphere cluster 
^{ 1}  This name is displayed as label in charts and reports where the formula is used.
Adding a formula
Navigate to Administration > DATA WAREHOUSE > Formulas.
Click Add new formula.
In the Add a new formula page, specify the following details:
Field Description Metric Selection Target Entity Category Select a target entity category for the formula from the following options:
 System
 Business Driver
Target Entity Type From the selected target entity category, narrow down to the target entity type to associate the formula with. TrueSight Capacity Optimization uses this entity type to filter the list of metrics to select from.
1. Click Edit to select a target entity for the formula.
2. From Available items, select the entity type and click to move to Selected Items.
3. Click Apply. The selected entity type is listed.
Note: If you do not select a Target Entity, the formula is associated with all entity types.Input Metrics for Target Entity Type Available only in the Advanced mode.
Select which metrics to display for the target entity type that you selected in the earlier step:
 Display only metrics associated with Target Entity Type
 Display all metrics
Input Metrics from Target Entity Select an input metric from the list, based on the Target Entity Type.
 Click Edit.
 Under Available items, several categories of metrics are displayed, depending on the selection you made in the previous step.
 Select the entity type(s) and click to move to Selected Items.
 Click Apply. The selected items are displayed in the Target Input Metrics list in the Formula Builder section.
Notes: If you select a BY metric, enter the name of the subresource in the <BY_metric_name> subresource field.
 If you select a performance metric and are in the Advanced mode, select the type of statistic from the <metric_name> statistic field. Set the value of the metric to default or any one of Average (AVG), Minimum (MIN), Maximum (MAX), or sum of values (SUM).
Additional input metrics Available only in the Advanced mode.
Select additional metrics to associate to the formula:
 No: The formula is associated to Target Entity only.
 From parent system: Select this option to select the information related to a parent entity.
 Parent Entity Type: Available if you select From parent system. Select the parent entity type for the Target Entity. Click Edit. Select the entity type(s) and click to move to Selected Items. Click Apply.
 Input Metrics for parent entity:Select whether you want metrics Based on Parent Entity Type or All metrics.
Input Metrics from parent entity: Click Edit. Under Available items select input metrics that are listed based on type selected in the previous step and click to move to Selected Items. Click Apply.
Notes: If you select a BY metric, enter the name of the subresource in the <BY_metric_name> subresource field.
 If you select a performance metric, select the type of statistic from the <metric_name> statistic field. Set the value of the metric to default or any one of Average (AVG), Minimum (MIN), Maximum (MAX), or sum of values (SUM).
The selected items are displayed in the Parent Input Metrics section in the Formula Builder section in the Formula tab.
 From child system: Select this option to select input metrics from a child system:
 Child Entity Type: Available if you select From child system. Select the child entity type for the Target Entity. Click Edit. Select the entity type(s) and click to move to Selected Items. Click Apply.
 Input Metrics for child entity:Select whether you want metrics Based on Child Entity Type or All metrics.
Input Metrics from child entity: Click Edit. Under Available items select input metrics that are listed based on type selected in the previous step and click to move to Selected Items. Click Apply.
Notes: If you select a BY metric, enter the name of the subresource in the <BY_metric_name> subresource field.
 If you select a performance metric, select the type of statistic from the <metric_name> statistic field. Set the value of the metric to default or any one of Average (AVG), Minimum (MIN), Maximum (MAX), or sum of values (SUM).
The selected items are displayed in the Child Input Metrics section in the Formula Builder section in the Formula tab.
Formula Formula Build the formula.This section consists of the Formula Builder box, Operators, Functions, Target Input Metrics and Parent Input Metrics.
All metric names added to the Target Input Metrics or Parent Input Metrics list start with "Target." or "Parent." respectively.
To write the formula, do the following:
 Doubleclick on the metric to add it to the Formula Builder. Six operators are supported: +, , *, /, (, and ).
 Click the required operator button to add them to the Formula Builder.
Four functions that operate on children metrics are supported: SUM, AVG, MIN, MAX.
Four functions that operate on subresource (BY_**) metrics are supported: SUMBY, AVGBY, MINBY, MAXBY.
Formula Label Type legend text for the formula that will be displayed on the chart. Formula Name The formula name is automatically generated using the Formula Label. It starts with "F_" and ends with the "_C" suffix. If a space is used in the Formula Label, it is converted to underscore (_). Formula Result Type Select a result type for the formula. This result type is used to compute the formula value.
Select unit Assign a unit of measure to the formula from the following options:
 not specified: No unit is set for the formula.
 existing: Select from one of the predefined units.
 custom: Create a new type of unit for the formula.
On save, the custom unit created is displayed in existing list.
The selected unit is represented on the yaxis of the chart.
 Click Save. If you receive any validation errors, correct the formula and click Save again.
The formula is saved and is listed in the Formulas page. You can now use it in appropriate analyses, as required.
Comments