diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index e64b620c15..14a1a0329f 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2013-02-04 Sergio Martin + + * lib/PandoraFMS/Core.pm: Set the last_known_status when + process module to fix an error of "to normal" status + events generation + 2013-01-31 Ramon Novoa * bin/pandora_server, diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 3521d6765c..820dc209c9 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1039,11 +1039,11 @@ sub pandora_process_module ($$$$$$$$$;$) { my $save = ($module->{'history_data'} == 1 && ($agent_status->{'datos'} ne $processed_data || $last_try < ($utimestamp - 86400))) ? 1 : 0; db_do ($dbh, 'UPDATE tagente_estado - SET datos = ?, estado = ?, last_status = ?, + SET datos = ?, estado = ?, last_status = ?, last_known_status = ? status_changes = ?, utimestamp = ?, timestamp = ?, id_agente = ?, current_interval = ?, running_by = ?, last_execution_try = ?, last_try = ? - WHERE id_agente_modulo = ?', $processed_data, $status, $last_status, $status_changes, + WHERE id_agente_modulo = ?', $processed_data, $status, $last_status, $last_status, $status_changes, $current_utimestamp, $timestamp, $module->{'id_agente'}, $current_interval, $server_id, $utimestamp, ($save == 1) ? $timestamp : $agent_status->{'last_try'}, $module->{'id_agente_modulo'});