Update delta filter docs for new percentage mode (#2647)

This commit is contained in:
Trent Houliston 2023-03-16 09:48:44 +11:00 committed by GitHub
parent 2c1dd252f7
commit 67db98f803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -456,11 +456,28 @@ values.
``delta``
*********
This filter stores the last value passed through this filter and only
passes incoming values through if the absolute difference is greater than the configured
value. For example if a value of 1.0 first comes in, it's passed on. If the delta filter
is configured with a value of 5, it will now not pass on an incoming value of 2.0, only values
that are at least 6.0 big or -4.0.
This filter stores the last value passed through this filter and only passes incoming values through
if incoming value is sufficiently different from the previously passed one.
This difference can be calculated in two ways an absolute difference or a percentage difference.
If a number is specified, it will be used as the absolute difference required.
For example if the filter were configured with a value of 2 and the last value passed through was 10,
only values greater than 12 or less than 8 would be passed through.
.. code-block:: yaml
filters:
- delta: 2.0
If a percentage is specified a percentage of the last value will be used as the required difference.
For example if the filter were configured with a value of 20% and the last value passed through was 10,
only values greater than 12 or less than 8 would be passed through.
However, if the last value passed through was 100 only values greater than 120 or less than 80 would be passed through.
.. code-block:: yaml
filters:
- delta: 20%
``or``
******