Create alert based on Percent Difference

Hi,

I need help to create an alert based on percent difference.

I have some graphs of network traffic (in Mbps). I would like to receive an alert if:

  • traffic from now is lower than 40% of some reference ago (5min, 1min, etc)
  • traffic from now is upper than 40% of some reference ago (5min, 1min, etc)

I’ve tried the percent_diff() formula, but it treats the value as absolute, not as percentage:

There’s an open issue and a recent PR with fix, but haven’t been merged yet.

Marcus

Hi,
I would like to know if the alert based on Percent Difference is NO more taking the value as absolute, if yes please which version is corrected and what the right syntax for condition using Percent Difference
Thank you
Soufi

I’m not really sure what you mean regarding absolute values. But the issue referenced above was fixed and release in Grafana v5.3 so any version starting from that should be good.

Still getting this issue at v6.6.0.
I’m now wondering how percent_diff works.
I need to compare two timeframes, get if there’s a deviation of X % and then alert.

I cannot find anywhere explaining every alerting function.

2 Likes

Still getting this issue at v7.3.7.

I would like to send an alert when the metric gets higher than previous value(s) by 5%, but it seems like it expects actual values for threshold, not percentage.