2013-02-04 Sergio Martin <sergio.martin@artica.es>

* lib/PandoraFMS/Core.pm:  Set the last_known_status when
	process module to fix an error of "to normal" status
	events generation



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7575 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-02-04 15:34:02 +00:00
parent 8b8c499b0f
commit 37c1a95c63
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-02-04 Sergio Martin <sergio.martin@artica.es>
* 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 <rnovoa@artica.es>
* bin/pandora_server,

View File

@ -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'});