From df95cbf960e8954ed161ab71c97aed5ecc234d9d Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Wed, 1 Sep 2021 21:10:11 +0200 Subject: [PATCH] Minor changes --- pandora_server/lib/PandoraFMS/Core.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 7bfcd5ce35..7512de0cfd 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -651,14 +651,17 @@ sub pandora_evaluate_alert ($$$$$$$;$$$$) { if (defined($data)) { # Data contains the number of occurrences of correlated alert. if ($data < $alert->{'pool_occurrences'}) { - # Less occurrences than previous execution, recovered. - # 4 Recover the alert - return 4; + # Less occurrences than previous execution, alert ceased. + # 3 Alert ceased + return 3; } elsif ($data eq $alert->{'pool_occurrences'}) { # Same occurrences as previous execution, nothing new, but present in pool. # 1 Do not execute the alert. return 1; - } + } elsif ($data eq 0) { + # 4 Recover the alert + return 4; + } # else fire the alert, at the end of this sub. } else { my $rc = enterprise_hook (