Tutorial by Examples

In order to avoid a divide by zero with a numberSet (what you get after a reduction like avg()) you can short-circuit the logic: $five = min(q("sum:rate{counter,,1}:haproxy.frontend.hrsp{}{status_code=5xx}", "1h", "")) $two = avg(q("sum:rate{counter,,1}:haproxy.f...
With series operations, things are dropped from the left side if there is no corresponding timestamp/datapoint in the right side. You can mix this with the dropbool function to avoid divide by zero: $five = q("sum:rate{counter,,1}:haproxy.frontend.hrsp{}{status_code=5xx}", "1h",...

Page 1 of 1