From fbad0d9bccd3b8c53a2d47e201602c9edcdf3ee0 Mon Sep 17 00:00:00 2001 From: "felix.suarez" Date: Tue, 19 Sep 2023 13:31:44 -0500 Subject: [PATCH] Fix: Avg. math function for complex alert --- pandora_server/lib/PandoraFMS/Core.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index f1cdecb7e0..e7ac485a1d 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -738,7 +738,7 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) { my $activate_alert = 0; if($function eq "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{ # Check if the hiscorical value meets the condition compared to the val. $activate_alert = eval("$historical_value $condition $value");