2010-09-09 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Fixed alert behaviour when time_from is greater than time_to. Fixes bug #3048043. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3236 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e3f2834fa5
commit
55f61be126
|
@ -1,3 +1,8 @@
|
||||||
|
2010-09-09 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Core.pm: Fixed alert behaviour when time_from is
|
||||||
|
greater than time_to. Fixes bug #3048043.
|
||||||
|
|
||||||
2010-09-08 Sancho Lerena <slerena@artica.es>
|
2010-09-08 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* util/compaq_chassis_trap_manager.pl,
|
* util/compaq_chassis_trap_manager.pl,
|
||||||
|
|
|
@ -228,8 +228,13 @@ sub pandora_evaluate_alert ($$$$$$$) {
|
||||||
|
|
||||||
# Check time slot
|
# Check time slot
|
||||||
my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec);
|
my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec);
|
||||||
return 1 if (($alert->{'time_to'} ne $alert->{'time_from'}) &&
|
if (($alert->{'time_from'} ne $alert->{'time_to'})) {
|
||||||
(($time ge $alert->{'time_to'}) || ($time le $alert->{'time_from'})));
|
if ($alert->{'time_from'} lt $alert->{'time_to'}) {
|
||||||
|
return 1 if (($time le $alert->{'time_from'}) || ($time ge $alert->{'time_to'}));
|
||||||
|
} else {
|
||||||
|
return 1 if (($time le $alert->{'time_from'}) && ($time ge $alert->{'time_to'}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Check time threshold
|
# Check time threshold
|
||||||
my $limit_utimestamp = $alert->{'last_reference'} + $alert->{'time_threshold'};
|
my $limit_utimestamp = $alert->{'last_reference'} + $alert->{'time_threshold'};
|
||||||
|
|
Loading…
Reference in New Issue