Max Calculation in TSVB over interval

I need to visualize the maximum value of a field during the last 10s. I have to use the TSVB for it (because later I need that value in a bucket script). But I'm having problems with the calculation.

I'm using the Gauge visual (but it doesn't matter which one I'm using) and I set the timerange mode to last value and interval to 10s. But what happens now is, that every 10s the value jumps back to 0. It seems like it's not looking at the max value of the overall last 10 seconds but at the max value of the last 10s bucket. It's like it's opening ab a new bucket every 10s and is checking for the max value (that's why the value can only increase) and after 10s it resets to 0 and then it starts again increasing.

Is there a way around this behavior?

See if these panel options will help select the data properly for your guage:

  • Panel options > Data timerange mode: Entire time range
  • Panel options > Panel filter: @timestamp: [now-10s/s TO now/s] (no KQL)

Instead of aggregating into 10second buckets, this will filter the data to the documents with timestamps within the last 10 seconds.

Thank you very much Tim! That works like a charm.


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