mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Do not update tagente_estado when processing out-of-order data.
Ref pandora_enterprise#6120.
This commit is contained in:
parent
fc885be510
commit
34639ac5c4
@ -1623,6 +1623,8 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
||||
|
||||
my $save = ($module->{'history_data'} == 1 && ($agent_status->{'datos'} ne $processed_data || $last_try < ($utimestamp - 86400))) ? 1 : 0;
|
||||
|
||||
# Never update tagente_estado when processing out-of-order data.
|
||||
if ($utimestamp >= $last_try) {
|
||||
db_do ($dbh, 'UPDATE tagente_estado
|
||||
SET datos = ?, estado = ?, known_status = ?, last_status = ?, last_known_status = ?,
|
||||
status_changes = ?, utimestamp = ?, timestamp = ?,
|
||||
@ -1632,6 +1634,7 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
||||
WHERE id_agente_modulo = ?', $processed_data, $status, $status, $new_status, $new_status, $status_changes,
|
||||
$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'});
|
||||
}
|
||||
|
||||
# Save module data. Async and log4x modules are not compressed.
|
||||
if ($module_type =~ m/(async)|(log4x)/ || $save == 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user