Hi Team,
I have a metric which measures the amount of compute seconds the
application has used so far. Example -
consumed_minutes{service="B"} 60
total_minutes{service="B"} 6000
now i need to setup alerts where i get alerted if rate of growth of
aforementioned consumed metric is very large -
Q a) the rate of usage growth in last 60 minutes is more than 20% and total
usage has exceeded 30%
Q b) If rate of usage grows from 30 to 50% in last 30 minutes ,
i think following query should be fine where i compare the growth of last
hour with growth of last 2 hours -
a.1)
( rate( consumed_minutes[60m] ) > rate( consumed_minutes[120m] ) * 1.20
) and
((consumed_minutes / total_minutes) * 100) > 30
a.2)
( rate( consumed_minutes[60m] ) > rate( consumed_minutes[60m] offset 60m
) * 1.20 ) and
( (consumed_minutes / total_minutes) * 100) > 30
b.1)
( rate( consumed_minutes[60m] ) > rate( consumed_minutes[120m] ) * 1.30
) and ( rate( consumed_minutes[60m] ) < rate( consumed_minutes[120m] )
* 1.50 )
b.2)
( rate( consumed_minutes[30m] ) > rate( consumed_minutes[30m] offset
30m) * 1.30 ) and
( rate( consumed_minutes[30m] ) < rate( consumed_minutes[30m] offset
30m) * 1.50 )
I am not sure which one out of aforementioned a.1 vs a.2 and b.1 vs b.2 is
more accurate. the aforementioned queries are good or there is more
accurate version of the aforementioned queries?
Please advice.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/1168aca2-efb1-4ba9-9efc-006f7c57ccfdn%40googlegroups.com.