mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2011-12-26 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Discard inc data when a second value with the same timestamp arrives. Thanks to eXXon. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5305 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
01dee14165
commit
d5a12f2737
@ -1,3 +1,8 @@
|
|||||||
|
2011-12-26 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* lib/PandoraFMS/Core.pm: Discard inc data when a second value
|
||||||
|
with the same timestamp arrives. Thanks to eXXon.
|
||||||
|
|
||||||
2011-12-23 Ramon Novoa <rnovoa@artica.es>
|
2011-12-23 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* conf/pandora_server.conf: Added Netflow server configuration
|
* conf/pandora_server.conf: Added Netflow server configuration
|
||||||
|
@ -1820,6 +1820,9 @@ sub process_data ($$$$$) {
|
|||||||
if ($module_type =~ m/_inc$/) {
|
if ($module_type =~ m/_inc$/) {
|
||||||
$data = process_inc_data ($data, $module, $utimestamp, $dbh);
|
$data = process_inc_data ($data, $module, $utimestamp, $dbh);
|
||||||
|
|
||||||
|
# Same timestamp as previous data. Discard.
|
||||||
|
return undef if($data == -1);
|
||||||
|
|
||||||
# Not an error, no previous data
|
# Not an error, no previous data
|
||||||
if (!defined($data)){
|
if (!defined($data)){
|
||||||
$data_object->{'data'} = 0;
|
$data_object->{'data'} = 0;
|
||||||
@ -1868,7 +1871,7 @@ sub process_inc_data ($$$$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Should not happen
|
# Should not happen
|
||||||
return 0 if ($utimestamp == $data_inc->{'utimestamp'});
|
return -1 if ($utimestamp == $data_inc->{'utimestamp'});
|
||||||
|
|
||||||
# Update inc data
|
# Update inc data
|
||||||
db_do ($dbh, 'UPDATE tagente_datos_inc SET datos = ?, utimestamp = ? WHERE id_agente_modulo = ?', $data, $utimestamp, $module->{'id_agente_modulo'});
|
db_do ($dbh, 'UPDATE tagente_datos_inc SET datos = ?, utimestamp = ? WHERE id_agente_modulo = ?', $data, $utimestamp, $module->{'id_agente_modulo'});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user