Try `min_over_time` on a subquery:

min_over_time(( some_traffic_metric / some_traffic_metrics offset
15m)[30m:]) < 0.8

/MR

On Thu, Jan 28, 2021 at 7:37 AM fiala...@gmail.com <fialamar...@gmail.com>
wrote:

> Hi,
>
> I have a simple rule for monitoring traffic drop (by 20% in last 15
> minutes):
>
> some_traffic_metric < (some_traffic_metric offset 15m * 0.8)
>
> I need this alert to be active for at least 30 minutes.
>
> Please help, how to rewrite the query.
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/1def3a6c-4804-4782-af0e-0109b05011dfn%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/1def3a6c-4804-4782-af0e-0109b05011dfn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAMV%3D_ga9c9z5dwXPyH6%3DNDUivwwUuYJH8ieWS090S_zRLNA7xQ%40mail.gmail.com.

Reply via email to