Alerting on value between 0 and 1 not possible

Hey guys I think I am going insane or something. Why can’t I use a decimal value in the classic condition? Am I doing something wrong? I just want an alert if the CPU has maxed out on a system. I tried the same alert with other values like memory percent and it worked without a problem, but here all values are from 0 to 1 and I can’t type 0.98 in the field for classical condition for some reason?

Is this a bug in the UI or am I missing something?
I can’t change the query because I don’t know a bit of how to create these flux queries, they are just copied from the dashboard and seem way to complicated to learn tbh (especially if I just need this one use case). I tried multiplying the value with 100 with the math expression, but it tells me I can’t use math in the classic condition?

Screenshot:

Please help…

Hi @madddogg2406 ,
Since you have multiple time series values you should first reduce them so that grafana evaluates each of them. After that you can set threshold after which alert will be triggered. Threshold expression is currently very simple so usually I use math expression (or both).

Best regards,
ldrascic

@madddogg2406
Continue as @ldrascic has outlined (A: Flux query → B: Reduce to single value → C: Set threshold condition). I wrote a tutorial for creating alerts using Flux here that will hopefully help you give you some guidance.

I tried your tutorial but I get alerts from every server which makes no sense to me:

It is $B > 0.98 if I want to alert on CPU values above 0.98 right? But it alerts everything.

Never mind guys I updated Grafana to :latest (thought I already was) and now it works as you described. Thank you ver much for your help :slight_smile:

1 Like