Fix: Avg. math function for complex alert

This commit is contained in:
felix.suarez 2023-09-19 13:31:44 -05:00
parent b7bc70f4ae
commit fbad0d9bcc
1 changed files with 1 additions and 1 deletions

View File

@ -738,7 +738,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) {
my $activate_alert = 0; my $activate_alert = 0;
if($function eq "avg"){ if($function eq "avg"){
# Check if the received value meets the condition compared to the avg. # Check if the received value meets the condition compared to the avg.
$activate_alert = eval("$historical_value $condition $data"); $activate_alert = eval("$data $condition $historical_value");
}else{ }else{
# Check if the hiscorical value meets the condition compared to the val. # Check if the hiscorical value meets the condition compared to the val.
$activate_alert = eval("$historical_value $condition $value"); $activate_alert = eval("$historical_value $condition $value");