Data quality rule that verifies if a data quality check reading is comparable to stdev range. A stdev is calculated based on previous results. The time window in which we define a number of previous results used to calculate stdev is customizable.
This rule has two parameters that should be declared for each alert.
rule threshold for a low severity (1) alert
rule threshold for a medium severity (2) alert
rule threshold for a high severity (3) alert
The following example shows how to implement
moving_stdev rule in
regex_match_percent sensor for a check.
The assigned severity depends on sensor result (see YAML configuration below):
Let's suppose that average
X and stdev
Y are calculated based on last
n readings. If result is in defined ranges, then the following alerts are returned
X + low.multipe_stdev_above * Y > result > X - low.multiple_stdev_below * Y, the check is passed: valid result
X + medium.multiple_stdev_below * Y < result < X - low.multiple_stdev_below * Yand
X + medium.multipe_stdev_above * Y > result > X - low.multipe_stdev_above * Ythe severity is low (1)
X + high.multiple_stdev_below * Y < result < X - medium.multiple_stdev_below * Yand
X + high.multiple_stdev_above * Y > result > X - medium.multiple_stdev_above * Ythe severity is low (2)
X + high.multiple_stdev_below * Y > resultor
X + high.multiple_stdev_above * Y < resultthe severity is high (3)
As you can see, time series specification is defined. It's necessary to indicate which column in your table is timestamp. You can do it defining fields