Apply a counting function to the values of a metric.
This algorithm takes as inputs the values of a metric, and apply to them one of the following counting functions:
- Count: count the metric values.
- Sum: sum the metric values.
- Elapsed Time: count the time spent by the metric in a certain condition (e.g. temperature > 100°C)
In case the Elapsed Time has been selected, you can also specify the predicate and value used by the condition applied to the metric values.
In case the Sum has been selected, you can also define whether the result value must be forced to be greater or equals to zero.
Optionally, the computation mode can be selected:
- DAILY: the result is the counter limited to the data of the calculation day.
- TOTAL: the result is the counter of the data of the calculation day added to the previously calculated value. In this case, the counter value always increases from day to day.
The behavior of insight metrics based on this algorithm is the same as for Counter metrics, with the difference that only a single computation a day takes place, and only one data point per day is saved, so no DPH are consumed.
Algorithm Configuration
To use this Algorithm, you need to:- Go to the Insight / Insight Metrics page.
- Select the Thing Definitions tab.
- Select the Thing Definition where to create the insight metric.
- Click the Add Metric button.
- Select the Counter algorithm.
- Configure the Algorithm required inputs.
Here is the list of inputs required by this Algorithm.
INPUTS | |
---|---|
Metric | The base metric whose values must be counted or summed. Type: METRIC | Mandatory | Dataset Range: Last 24 hours |
Counter | The counter applied to the count metric. Type: SELECTION | Mandatory | Values: COUNT
SUM
ELAPSED_TIME
|
Mode | The mode of count. Type: SELECTION | Mandatory | Values: DAILY
TOTAL
|
Condition Predicate | The predicate of the condition to filter metric values. Type: SELECTION | Optional | Values: LESS
LESS_EQUAL
EQUAL
NOT_EQUAL
GREATER_EQUAL
GREATER
|
Condition Value | The value of the condition to filter metric values. Type: STRING | Optional |
Force to greater equal than zero | In case of SUM counter, the result count value cannot be less than zero. Type: CHECKBOX | Optional |
Here is the list of outputs provided by this Algorithm.
OUTPUTS | |
---|---|
Counter Value | The counter value. Type: FLOAT |
Comments
0 comments
Please sign in to leave a comment.