Could you please explain how this percent_diff() query is working in grafana panel alert.
What’s the exact formula behind this percent_diff () query.
I am planning to use below query on my Graph panel
WHEN percent_diff () OF query (A, 45m, now-15m) IS ABOVE 50.
I would appreciate your support on this issue.
Awaiting for your reply and support. Below are the two sample values of percentage difference. please let me know, how grafana is conevrting into the percentage difference value.
Hi, I hope is not too late.
(newest - oldest) / math.Abs(oldest) * 100
value = (1283.75-1018.75)/1018.75 * 100 ==> 26.012269938650306
More information you can find in this code
Thank You very much for your update & support.
is this somehow contained in the docs? Or is there a ticket which I could vote for to encourage a better documentation of this great feature? Digging into to the sources feels suboptimal ihmo.
Thanks & kind regards,