mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-23 05:45:59 +02:00
Merge branch 'ent-6140-problema-en-el-server-con-use_xml_timestamp-1-v747-con-agentes-diferente-zona-horaria' into 'develop'
Ent 6140 problema en el server con use xml timestamp 1 v747 con agentes diferente zona horaria See merge request artica/pandorafms!3441
This commit is contained in:
commit
aceeed4080
@ -1737,19 +1737,8 @@ sub pandora_process_module ($$$$$$$$$;$) {
|
||||
if ($pa_config->{'dataserver_lifo'} == 1 && $utimestamp <= $agent_status->{'utimestamp'}) {
|
||||
logger($pa_config, "Received stale data from agent " . (defined ($agent) ? "'" . $agent->{'nombre'} . "'" : 'ID ' . $module->{'id_agente'}) . ".", 10);
|
||||
|
||||
# Save module data. Async and log4x modules are not compressed.
|
||||
if ($module_type =~ m/(async)|(log4x)/ || $save == 1) {
|
||||
|
||||
# If previous timestamp data changes, save the last one to avoid errors on SLA or graphs.
|
||||
if($last_data_value ne $processed_data) {
|
||||
|
||||
my $last_data_timestamp = $agent_status->{'utimestamp'};
|
||||
my $last_data_object;
|
||||
|
||||
$last_data_object->{'data'} = $last_data_value;
|
||||
|
||||
save_module_data ($last_data_object, $module, $module_type, $last_data_timestamp, $dbh);
|
||||
}
|
||||
# Save module data. Compression does not work for stale data.
|
||||
if ($module->{'history_data'} == 1) {
|
||||
save_module_data ($data_object, $module, $module_type, $utimestamp, $dbh);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user