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 out-of-the-box and custom (user-defined) 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 out-of-the-box 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:

CharacteristicFormulasMetrics

Can be used:

  • In various analyses and quick analyses.
  • In the System Analysis tab.
  • In an analysis template. When you run the analysis again using that template, it shows the data for the formula that is used in that template.
  • To plot a chart with formulas as points.
(tick)(tick)

Analysis functions allowed:

  • Entity, metric and subresource filters
  • Time filter
  • Chart options
  • Group options
  • Metrics style
  • Trendlines
  • Events
 (tick)(tick)
Analysis function 'Correlation'(error)(tick)
Can be used in Resource Monitor Rules(error)(tick)
Can be used in Hierarchy Rules(error)(tick)
Stored in data warehouse1(error)(tick)

Forecasted values and Statistic selection2

(error)(tick)
Available in PV tables(error)(tick)

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: Out-of-the-box and User-defined or Custom formulas.

UI elementDescription
Formulas table
Formula NameInternal name of the formula generated by the system using the user-defined name. All custom formula names have a _C suffix.
Formula LabelUser-defined name that is used as the label in charts and reports.
PackageDenotes if the formula is in-built or custom.
Actions on formulas
Add formulaClick 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 out-of-the-box formulas.

Out-of-the-box formulas

The following table provides details of the out-of-the-box formulas that are available with the product. You cannot modify these formulas.

Name1
Internal Name
Description
Details
For Target Entity
Cluster queue per processorF_CLUSTER_QUEUE_PER_PROCESSORCalculates the queue length per processor for vSphere clusterAVG (Host.CPU_READY)vSphere cluster
Memory OvercommitmentF_MEMORY_OVERCOMMITMENTCalculates the memory overcommitment in percentage for the vSphere cluster and vSphere host.

SUM (VirtualMachine.TOTAL_REAL_MEM)/<Parent>.TOTAL_REAL_MEM
 

  • For vSphere cluster parent entity: SUM (VirtualMachine.TOTAL_REAL_MEM)/ Cluster.TOTAL_REAL_MEM
  • For vSphere host parent entity: SUM (VirtualMachine.TOTAL_REAL_MEM)/Host.TOTAL_REAL_MEM
  • vSphere cluster
  • vSphere host
Spec usedF_SPEC_USEDCalculates the Spec used for the vSphere cluster

SUM (Host.BYBENCHMARK_VALUE[SPECINTRATE2006]) *Cluster.CPU_UTIL

vSphere cluster
Spec configuredF_SPEC_CONFIGUREDCalculates the Spec configured for the vSphere clusterSUM (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

  1. Navigate to Administration > DATA WAREHOUSE > Formulas.

  2. Click Add new formula.

  3. In the Add a new formula page, specify the following details:

    FieldDescription
    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.

    1. Click Edit.
    2. Under Available items, several categories of metrics are displayed, depending on the selection you made in the previous step.
    3. Select the entity type(s) and click to move to Selected Items.
    4. 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:

    1. Double-click on the metric to add it to the Formula Builder. Six operators are supported: +, -, *, /, (, and ).
    2. 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, MINBYMAXBY.
    Formula LabelType legend text for the formula that will be displayed on the chart.
    Formula NameThe 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 y-axis of the chart.

  4. 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.

Where to go from here

Using a custom formula in an analysis

Was this page helpful? Yes No Submitting... Thank you

Comments