Working with Keys

If channel source variable is tabular, the channel may work in two modes by creating either one or multiple RRD Datasets for a single source variable. These modes are switched by Use Key Field flag. See Statistics Configuration Examples to learn how to use both modes.

Use Key Field

The channel may work in two modes:

  • If Use Key Field is disabled (the default setting), a single Dataset (i.e. set of statistical data) is created for this channel.

  • If Use Key Field is enabled, one Dataset is created for every record in the source variable's value. This option does, of course, have sense only for channels based on tabular variables. The name of dataset is defined by the unique record key that is constructed according to Key Field property.

Here is what action is taken by the system when channel source variable is updated:

  • When Use Key Field is disabled, the channel Expression is evaluated only once, having row number zero as the default row during evaluation. The result of evaluation is converted to a number and the only dataset (that is untitled) is updated with this number.

  • When Use Key Field is enabled, the channel Expression is evaluated once for every row found in the source table. For each row:

  • First, the system determines what dataset does current row correspond to. This is performed by either taking value of Key Field or value of first field that is marked as key in variable format.

  • Second, channel Expression is evaluated having current row set as the default row.

  • Third, the dataset those named was determined at step (a) is updated.

Key Field

This property defines what field of channel source variable is used to determine RRD dataset names when Use Key Field is enabled. Here is how the dataset name is constructed from the Data Table record:

  • If Key Field is non-NULL, value of this field will be used as dataset name;

  • If Key Field is NULL, the value of first key field defined in table format will be used as dataset name;

  • If Key Field is NULL and no key fields are defined in table format, dataset name will match current record's number.

Data Life Span for Missing Keys

In the case that Key Fields are being used, the Data Life Span for Missing Keys property defines how long to archive data for which there is no longer an associated key.

  • If a missing key reappears before the life span expires for a given archive, the data archive will automatically be re-associated with its key.

  • If a key is missing for longer than the life span period, data associated with the key will be permanently removed

  • A value of 0 for Data Life Span for Missing Keys indicates that as soon as a key disappears, its associated data will be deleted.

Was this page helpful?