Fix: return status for non activated alert

This commit is contained in:
felix.suarez 2023-09-15 12:51:56 -05:00
parent 976a32617f
commit b7bc70f4ae
1 changed files with 3 additions and 3 deletions

View File

@ -743,8 +743,8 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) {
# Check if the hiscorical value meets the condition compared to the val.
$activate_alert = eval("$historical_value $condition $value");
}
return $status if $activate_alert;
# Return $status if the alert is not activated
return $status if !$activate_alert;
}
}
@ -779,7 +779,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) {
if(defined ($agent)) {
pandora_mark_agent_for_alert_update ($dbh, $agent->{'id_agente'});
}
return 0; #Launch the alert
}