eval_division_by_zero
Diagnostic `nanook::eval::division_by_zero`
Summary
division by zero
Help
ensure the divisor is non-zero before applying /
Details
When this fires
Runtime error from the evaluator when a / divides by zero. Most often the divisor is a metric that legitimately reads 0 (idle counter, empty queue), or an arithmetic subexpression that collapses to zero on certain hosts.
What to check
Guard the divisor with a comparison before the division.
# broken: explodes when net.tx is 0
= "net.rx / net.tx > 2"
# fixed: gate on the divisor first
= "net.tx > 0 and net.rx / net.tx > 2"