Hello,
I have a time series graph as shown below and I want to calculate the sum of peak values in this time series data before it hits zero.
The metric name that I am using is provided by redpanda connect here.
I tried using query like this floor(sum(increase(input_received{}[24h]))) but due to increase function I am not getting the correct values.
Any help is much appreciated.
Thanks
How do you define/find peak values?
1 Like
In my scenario the peak value is the last value just before the metric(input_received) hits 0 and climbs back again.
When my workload restarts the value for input_received metric goes to zero and it climbs up as more messages are received.
IMHO it doesn’t make sense to find “peaks”, but
1.)
calculate the increase per scrape period
e.g.
increase(your_counter_metric[1m])
2.) then sum it per day
e.g.
sum_over_time(increase(your_counter_metric[1m])[1d:1m])
Of course, fix any syntax/functional issues for your case
1 Like