Merge branch 'ent-8506-hostalive-umbral-inverso' into 'develop'

Ent 8506 hostalive umbral inverso

See merge request artica/pandorafms!5113
This commit is contained in:
Daniel Rodriguez 2022-09-21 13:36:01 +00:00
commit fe7948294e
1 changed files with 5 additions and 11 deletions

View File

@ -5101,17 +5101,14 @@ sub get_module_status ($$$$) {
}
# (-inf, critical_min), [critical_max, +inf)
else {
if ($critical_min == 0) {
return 1 if ($data > $critical_max);
}elsif ($critical_max == 0) {
return 1 if ($data <= $critical_min);
if ($critical_max < $critical_min) {
return 1 if ($data < $critical_min);
} else {
return 1 if ($data < $critical_min || $data >= $critical_max);
return 1 if ($data <= $critical_max && $critical_max < $critical_min);
}
}
}
# Warning
if ($warning_min ne $warning_max) {
# [warning_min, warning_max)
@ -5121,13 +5118,10 @@ sub get_module_status ($$$$) {
}
# (-inf, warning_min), [warning_max, +inf)
else {
if ($warning_min == 0) {
return 2 if ($data > $warning_max);
}elsif ($warning_max == 0) {
return 2 if ($data <= $warning_min);
if ($warning_max < $warning_min) {
return 2 if ($data < $warning_min);
} else {
return 2 if ($data < $warning_min || $data >= $warning_max);
return 2 if ($data <= $warning_max && $warning_max < $warning_min);
}
}
}