Influx query to find datapoints that are preceded and succeeded by a zero value

37 views Asked by At

I'm relatively new to influx, but need to find 'glitch' datapoints in a dataset. These are where data is zero for a while, then a single non-zero value, then zero again. How could I write a query for this in either Flux or InfluxQL? I've played with using derivative function, but that's not quite what I want (there are places in legitimate data where the derivative will be high, but for datapoints not surrounded by zeroes).

0

There are 0 answers