Reputation: 5588
I have Grafana with Graphite metrics. I have a graph showing the EnqueueCount
of some specific queue in ActiveMQ. The problem is that the EnqueueCount
shows all values since the queue was created, so when I narrow down the time range in Grafana to "today so far", the graph looks like this:
I would like it to show only values for current period - I would like the graph to always start at 0. In this case I would like to offset it by -2. There is an offset
function, however it is only by constant, while I would need something like "offset by lowest value in time period".
I went through Graphite documentation, but cannot find any function which would allow me to do this.
Any ideas how I could achieve this?
Versions we use:
Upvotes: 2
Views: 1231
Reputation: 794
Please use nonNegativeDerivative() function - then you will get a rate of EnqueueCount change in (your metric interval, usually it is) minute. If you want to get count again - use integral().
So, integral(nonNegativeDerivative(EnqueueCount))
- but usually people looking for rate, then derivative is enough.
Upvotes: 2