Non-negative Serial Diff for a "counter" that resets to 0 from time to time

I'm collecting stats from some industrial process that has variable number of workers that produce some output at a variable rate, that is accumulating to a balance queue that from time to time is flushed and reset to 0.

I'm trying to visualise the rate of change in the queue, ie how much have the workers produced in the given period of time. It should be reasonably simple with serialDiff aggregator, however flushing the output queue throws the stats off as it always produces a massive negative spike. How can I overcome that? I would like to have something like nonNegativeSerialDiff similar to what InfluxDB has.

I want to get rid of the massive red negative spikes. When that happens the counter was reset to 0 so the next diff point should be the actual balance on blue line (e.g. 50 or so).

If anyone is interested the sample data is here: https://pastebin.com/4wNs8YvK (note that I have added output column to the data set that's the value that I ultimately want to display, but I don't have it in the actual source data, it's only there for reference).

Thanks!

This is actually an existing feature of the TSVB visualization type. There is a shortcut called "counter rate" or "positive rate" depending on your version (we just renamed it). You can also do the same by doing a "Positive only" function in TSVB

That's exactly what I need, thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.