Random Project

chage for return state

I use the vanilla code and i observe that the warning state return over the critical state. in my opinion it’s due to the place of the condition in the code. So i switch the line 386
if ( ( $in_usage > $crit_usage ) or ( $out_usage > $crit_usage ) or ( $if_status != 1 ) ) {
$state = “CRITICAL”;
}
with the line 392

if ( ( $in_usage > $warn_usage )
or ( $out_usage > $warn_usage ) && $state eq “OK” )
{
$state = “WARNING”;
}

this resolve the issue for me