0

I am trying to use rate() query like comparing last 10 min with the previous 50 min like:

(sum by() rate(cmd_get{}[10m]) / (sum by() rate(cmd_get{}[50m] offset 10m))

If I want to check the percentage increase is more than 50% then what is the constant_value I can compare the above query with? query > constant_value

or if I want to find to decrease by 50% or more I should give < constant_value

or how can I see the percentage change, what would be the query used for that

1 Answers1

1

Try the following query:

(sum rate(cmd_get[10m]) / sum rate(cmd_get[50m] offset 10m)) > 0.5 < 1.5

See the live example here.

hagen1778
  • 669
  • 3
  • 8