How would i create an alert rule say if Nginx requests drops less than 10% than previous value .

Hi … How would i create an alert rule say if Nginx requests drops less than 10% than previous value .

  • say 8.00 AM i have 2k requests incoming and at 8.05 AM requests dropped to 1600
  • fyi : these are prometheus based metrics

How can i configure alert So i can be alerted on this change

You should be able to use offset to detect such a drop, the query would look something like this:

sum(increase(http_requests_total[2m]))
/ sum(increase(http_requests_total[2m] offset 5m))
< 0.9