In a Grafana dashboard with several datapoints, how can I get the difference between the last value and the previouse one for the same metric? Perhaps the tricky part is that the time between 2 datapoints for the same metric is not know.
so the desired result is the <metric>.$current_value - <metric>.$previouse_value
for each point in the metricstring.
Edit: The metrics are stored in graphite/Carbon DB.
thanks
You need to use the derivative function
Together with the keepLastValue
Like this
A good example can be found here http://www.perehospital.cat/blog/graphite-getting-derivative-to-work-with-empty-data-points