Fix footprint logic for metrics equal zero

This commit is contained in:
Christoph Kluge 2024-02-09 17:09:08 +01:00
parent c897c8e56b
commit 71386f8466

View File

@ -111,12 +111,12 @@
else return (mean <= thresholds.peak && mean > thresholds.normal)
case 'alert':
if (metric === 'mem_used') return (mean <= thresholds.alert && mean > thresholds.caution)
else return (mean <= thresholds.alert && mean > 0)
else return (mean <= thresholds.alert && mean >= 0)
case 'caution':
if (metric === 'mem_used') return (mean <= thresholds.caution && mean > thresholds.normal)
else return (mean <= thresholds.caution && mean > thresholds.alert)
case 'normal':
if (metric === 'mem_used') return (mean <= thresholds.normal && mean > 0)
if (metric === 'mem_used') return (mean <= thresholds.normal && mean >= 0)
else return (mean <= thresholds.normal && mean > thresholds.caution)
default:
return false