Skip to content

Data point aliases

Performance reports pull information from various data points that represent a metric. The report itself knows which data points it requires,and which modifications are needed, if any, to put the data in its proper units and format.

The addition of a data point requires changing the report.

To allow for more flexibility in changes, some reports use data point aliases. Data point aliases group data points so they can be more easily used for reporting. In addition, if the data points return data in different units, then the plugin can normalize that data into a common unit.

An alias-based report looks up the data points that share a common alias string, and then uses them. This approach allows you to add data points without changing the report.

In the simplest cases, data from the target data points are returned in units expected by a report. For cases in which data are not returned in the same units, an alias can use an associated formula at the data point. For example, if a data point returns data in kilobytes, but the report expects data in bytes, then the formula multiplies the value by 1024.

Alias formula evaluation

The system evaluates the alias formula in three passes.

Pass 1: Reverse polish notation

When complete, the alias formula must resolve to a Reverse Polish Notation (RPN) formula.

In RPN, the formula to convert kilobytes into bytes is:

1024,*

For more information about RPN formulas, refer to RPN documentation.

Pass 2: TALES expressions

For cases in which contextual information is needed, the alias formula can contain a TALES expression that has access to the device as context (labeled as "here"). The result of the TALES evaluation should be an RRD formula.

In TALES, the formula to convert kilobytes into bytes is:

${here/hw/totalMemory},/

Pass 3: Python expressions

You also can embed full Python code in an alias formula. The code must construct a string that results in a valid RRD formula.

To signal the system to evaluate the formula correctly, it must begin with:

__EVAL:

In Python, the formula to convert kilobytes into bytes is:

__EVAL:here.hw.totalMemory + ",/"

Adding a data point alias

To add an alias to a data point:

  1. Navigate to a data source on a monitoring template.
  2. Double-click a data point in the list to edit it. The Edit Data Point dialog box appears.
  3. Enter the alias name and the formula.

    Note: If the data point returns values in the preferred units, then leave the Formula value blank.

  4. Click Save.