Statistics Configuration Examples

Top  Previous  Next

This section provides several examples of configuring statistics channels to solve everyday tasks.

Example 1: Temperature

Assuming we've a simple variable that represents current temperature in degrees (Celsius). The variable has only one record with a single field called temp. However, we want our statistics to be based on Fahrenheit-scale metering.

Here is how the channel properties should be set up for this case:

The channel Expression should be {temp} * 9 / 5 + 32. This will ensure temperature conversion.
Since the channel is based on a simple (non-tabular) variable, Use Key Field setting should be disabled.

Example 2: Disk Usage

This example illustrates how to track disk usage for the case when multiple disks stats is located in a single table.

Assuming we have a variable with the following value:

Label (Key Field)

Disk

Used

Total

00DFFF

C:

150

300

45CABC

D:

500

700

CBBC99

E:

10

30

Label field is a key field according to the above table's format.

Here is how the channel properties should be set up for this case:

Our channel Expression will be {Used}
Since we need to create a single RRD dataset for every tracked disk, the Use Key Field flag should be enabled
If we leave Key Field Name property at default (NULL), the system will use value of Label field (i.e. disk labels) as dataset names. This will happen since Label is a key field. However, this is not convenient, so we set Key Field to Disk. This forces disk names to be used for naming RRD datasets.