Revert "Ent 6978 umbrales inversos fallan"

This reverts commit fd372d53d1.
This commit is contained in:
Ramon Novoa 2022-09-15 13:19:23 +02:00
parent d9f48426dd
commit f79fb05318
1 changed files with 5 additions and 17 deletions

View File

@ -5096,17 +5096,11 @@ 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);
} else {
return 1 if ($data < $critical_min || $data >= $critical_max);
return 1 if ($data <= $critical_max && $critical_max < $critical_min);
}
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)
@ -5116,14 +5110,8 @@ 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);
} else {
return 2 if ($data < $warning_min || $data >= $warning_max);
return 2 if ($data <= $warning_max && $warning_max < $warning_min);
}
return 2 if ($data < $warning_min || $data >= $warning_max);
return 2 if ($data <= $warning_max && $warning_max < $warning_min);
}
}
}