mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Fixed that an unexpected alert is fired after recovering from unknown state
during ff_threshold is activated.
This commit is contained in:
parent
bcbd4ed498
commit
ba0f218216
@ -1353,7 +1353,7 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
|||||||
$min_ff_event = $module->{'min_ff_event_warning'} if ($new_status == 2);
|
$min_ff_event = $module->{'min_ff_event_warning'} if ($new_status == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($last_status == $new_status) {
|
if ($last_status == $new_status || $last_status == 3) {
|
||||||
|
|
||||||
# Avoid overflows
|
# Avoid overflows
|
||||||
$status_changes = $min_ff_event if ($status_changes > $min_ff_event);
|
$status_changes = $min_ff_event if ($status_changes > $min_ff_event);
|
||||||
@ -1398,7 +1398,7 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
|||||||
$last_status = $new_status; # Set last_status before forcing the module's new status to its last known status.
|
$last_status = $new_status; # Set last_status before forcing the module's new status to its last known status.
|
||||||
$new_status = $last_known_status; # Set the module to its last known status.
|
$new_status = $last_known_status; # Set the module to its last known status.
|
||||||
generate_status_event ($pa_config, $processed_data, $agent, $module, $new_status, $status, $last_known_status, $dbh);
|
generate_status_event ($pa_config, $processed_data, $agent, $module, $new_status, $status, $last_known_status, $dbh);
|
||||||
$status = $new_status;
|
$status = $last_known_status;
|
||||||
|
|
||||||
# Update module status count.
|
# Update module status count.
|
||||||
$mark_for_update = 1;
|
$mark_for_update = 1;
|
||||||
@ -1430,7 +1430,7 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
|||||||
id_agente = ?, current_interval = ?, running_by = ?,
|
id_agente = ?, current_interval = ?, running_by = ?,
|
||||||
last_execution_try = ?, last_try = ?, last_error = ?,
|
last_execution_try = ?, last_try = ?, last_error = ?,
|
||||||
ff_start_utimestamp = ?
|
ff_start_utimestamp = ?
|
||||||
WHERE id_agente_modulo = ?', $processed_data, $status, $last_status, $last_status, $status_changes,
|
WHERE id_agente_modulo = ?', $processed_data, $status, $last_status, $status, $status_changes,
|
||||||
$current_utimestamp, $timestamp, $module->{'id_agente'}, $current_interval, $server_id,
|
$current_utimestamp, $timestamp, $module->{'id_agente'}, $current_interval, $server_id,
|
||||||
$utimestamp, ($save == 1) ? $timestamp : $agent_status->{'last_try'}, $last_error, $ff_start_utimestamp, $module->{'id_agente_modulo'});
|
$utimestamp, ($save == 1) ? $timestamp : $agent_status->{'last_try'}, $last_error, $ff_start_utimestamp, $module->{'id_agente_modulo'});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user