Skip to content

32. Metric Harvester Filter

The Metric Harvester filter provides a way to capture properties from datum generated by data sources as metrics.

This filter is provided by the Metrics Harvester plugin, which is included in the solarnode-app-metrics-harvester package in SolarNodeOS.

32.1 Settings

Metric Harvester component settings

Each filter configuration contains the following overall settings:

Setting Description
Service Name A unique ID for the filter, to be referenced by other components.
Service Group An optional service group name to assign.
Source ID A case-insensitive pattern to match the input source ID(s) to filter. If omitted then datum for all source ID values will be filtered, otherwise only datum with matching source ID values will be filtered.
Required Mode If configured, an operational mode that must be active for this filter to be applied.
Required Tag Only apply the filter on datum with the given tag. A tag may be prefixed with ! to invert the logic so that the filter only applies to datum without the given tag. Multiple tags can be defined using a , delimiter, in which case at least one of the configured tags must match to apply the filter.
Properties A list of datum property configurations. See Property settings for more information.
Expressions A list of expression configurations. See Expression settings for more information.

32.2 Property settings

Use the Properties + and - buttons to add/remove property configurations. Each property configuration contains the following settings:

Setting Description
Property Type The type of the datum property to extract.
Property The name of the datum property to extract. Only numeric properties are supported.
Unit Offset An offset to add to the value. This is the first transform applied. Set to 0 for no offset.
Unit Multiplier A multiplication factor to normalize the value into some other unit. This is the second transform applied, after the Unit Offset. Set to 1 to leave the input unchanged.
Multiplier A multiplication factor to normalize the value into some other unit. This is the third transform applied, after the Unit Multiplier. Set to 1 to leave the input unchanged.
Offset An offset to add to the value. This is the forth transform applied, after the Multiplier. Set to 0 for no offset.
Metric Name The metric name to assign to the value.

32.2.1 Value transform

The various Multiplier and Offset settings allow you to apply two linear equations to the datum property values to transform a raw data value x into a corresponding metric value y.

First the Unit Offset B and Unit Multiplier M are applied using the equation

y = (x + B) × M

Then the Multiplier m and Offset b are applied using the equation

y = (m × x) + b

Taken together, the overal equation applied is thus:

y = (m × ((x + B) × M)) + b

32.3 Expression settings

Metric Harvester expression settings

Use the Expressions + and - buttons to add/remove property configurations. Each expression configuration contains the following settings:

Setting Description
Metric Name The metric name to assign to the value.
Expression The expression to evaluate. See Expressions for more info.
Expression Language The expression language to write Expression in.