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
afdc15e750
commit
edd00a8f88
|
@ -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>
|
||||
|
||||
* conf/pandora_server.conf: Added Netflow server configuration
|
||||
|
|
|
@ -1820,6 +1820,9 @@ sub process_data ($$$$$) {
|
|||
if ($module_type =~ m/_inc$/) {
|
||||
$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
|
||||
if (!defined($data)){
|
||||
$data_object->{'data'} = 0;
|
||||
|
@ -1868,7 +1871,7 @@ sub process_inc_data ($$$$) {
|
|||
}
|
||||
|
||||
# Should not happen
|
||||
return 0 if ($utimestamp == $data_inc->{'utimestamp'});
|
||||
return -1 if ($utimestamp == $data_inc->{'utimestamp'});
|
||||
|
||||
# Update inc data
|
||||
db_do ($dbh, 'UPDATE tagente_datos_inc SET datos = ?, utimestamp = ? WHERE id_agente_modulo = ?', $data, $utimestamp, $module->{'id_agente_modulo'});
|
||||
|
|
Loading…
Reference in New Issue