How do indicator formulas work?

Formula components

An indicator formula defines the calculation of a KPI value. A formula is optional if only one counter is configured.

Formulas are composed of the following components, combined as needed.

Component

Definition

Notes

Counter functions

Aggregation functions performed on a per-counter basis with one value output per counter for each resource. The output of the counter function is then used in the rest of the formula calculation.

Counter functions are expressed as counter_function, for example, input-utilization_avg.

The following function types are available on a counter:

  • sum: adds up all samples received for the counter during the window duration. Sum is used for counted statistics such as octets or packets.

  • avg: the average of all samples received for the counter during the window duration. Avg is used for rate or value statistics such as percentage or temperature.

  • min/max: the minimum or maximum value of all samples received for the counter during the window duration.

Arithmetic operations

Simple arithmetic operations using one or more counters received from each unique resource. These operations produce n KPI outputs (one per resource), per window period. Operations can include counter functions and numbers. Negative numbers must be in parentheses.

An example of an arithmetic expression is:

|({received-octets-periodic_sum} — {transmitted-octets-periodic_sum})| * 8 / 60

The following arithmetic operations can be performed:

  • addition (+)

  • subtraction ( — )

  • multiplication (*)

  • division (/)

  • absolute value (| |)

Aggregation functions

A formula can perform aggregations on one or more counters received from every resource. This aggregation produces a single indicator output (one KPI value for all resources) per window period.

An aggregation operation can perform multiple aggregation operations and can include arithmetic operations. For example, a formula for average utilization in the sample indicator is:

avg({input-utilization_avg})

The following aggregation operations are available:

  • min

  • max

  • sum

  • avg

An example formula combining the components is: max(({transmitted-octets-periodic_sum}+{received-octets-periodic_sum})*8/60)/sum({speed_avg})*100

This formula creates a single mixed-expression-operator that has two aggregation operations: the first outputs the port with the maximum value of ((tx+rx)*8/60), the second sums the speed of all ports. These two outputs are then divided and the result multiplied by 100.