My time series data contains a boolean field, which changes frequently. I want to count the number of changes of said field.
Optimally I would like to create a field containing this number while ingesting, but showing the current count on a Kibana Dashboard suffices.
I came up with the following approaches:
- Calculate a cummulative sum over the boolean field, filter by negative values and output the cardinality of the result.
- Use serial_diff on the boolean field and sum over the result.
However I was not able to construct said queries or find dashboard functionality to represent this behaviour. Help is greatly appreceated.