Skip to content

Creating a Computed Metric

Combine base KPIs into computed metrics with expressions, including core computed metrics.

3 min read Updated SS

Classic Control Center · Setup → Topology → Metrics → Computed.

Creating a Computed Metric#

1. Refer Navigation.

2. Click on the Computed tab.

Manage Metrics Computed tab listing standard and custom computed metrics

3. Click Add. The following screen is displayed.

Add Computed Metric form

4. Enter the type of the component in the Component Type box.

5. Select the component name from the Component box.

6. Select the version of the component from the Common Version box.

7. Select the status using the Status toggle.

8. Enter the type for the computed metric in the Metric Type box. It can be Core or Availability.

9. Select the category for the metric in the Metric Category box.

10. Enter the computed metric name in the Metric Name box.

11. Enter the description for the computed metric in the Metric Description box.

12. Select the group for the computed metric in the Metric Group Name box. Provide a description for the selected group in the Metric Group Description box. The group KPI name can be an existing one or a new one.

To add a new group KPI, enter the group KPI name and press Enter. You can enter a description for the metric group in the Metric Group Description box only when you add a new custom group. Otherwise, the Control Center disables the Metric Group Description box.

Add Computed Metric form with build expression and group fields

When you add a new custom group KPI, the Control Center enables the Discovery and Non Discovery boxes. If you select an existing group KPI, the Control Center disables these options. If you select the Discovery option, HEAL automatically discovers the groups at run time via the KPI-related scripts. Once the data collection starts for such KPIs, you get information related to the attributes as well. In case of Non Discovery, you need to add KPI attribute-related information in the Percona database as part of SDM creation. Using this, you can validate KPIs data.

Add - Computed Metrics screen for a non-group KPI with blank Metric Group Name and Metric Group Description

For a non-group KPI, the group name and description for the group are blank. If you enter a new group, you may remove it before you save the metric. To remove it, hover on the Metric Group Name box, and click the cross mark that appears. The group name you entered earlier disappears.

Metric Group Name box showing New_Group_KPI with the cross mark used to remove the newly entered group

13. Building Expression. Include at least one KPI of type Availability in the computed expression. You can add a maximum of 10 rules. Click Add Rule to add a rule. Click Add Rule Group to add groups. You can select group and non-group KPIs. Non-group KPIs do not have a symbol pre-fixed. Group KPIs have a symbol pre-fixed to differentiate between group and non-group KPIs.

When you create a computed Group KPI, you should select only one group in one rule.

Build Expression section with the KPI drop-down open for selecting group and non-group KPIs in a rule
Expression builder showing rules and Expression box

You can view the expression in the Expression box. You can drag and drop a particular row to change its position in the builder and thereby change the expression. To do this, hover on a row and position it wherever you need to.

Build Expression rule row with the drag handle visible for repositioning, with the resulting expression shown in the Expression box

14. Click Save to create the computed metric. Click Cancel to discard the edits.

Once HEAL creates the KPI, HEAL enables it by default. HEAL applies this KPI to all the applicable component instances. By default, HEAL marks it for generating events.

Metric added successfully confirmation on Manage Metrics screen

Adding a Core Computed Metric#

Add - Computed Metrics dialog showing Build Expression with a Rule Group and Expression CPU.CPU Util + (KPI)
Add - Computed Metrics dialog continuation showing Additional Details with Data Type, Unit, Cluster Operation, Rollup Operation, Instance Aggregation, Cluster Aggregation and Collection Interval Time