2014-03-13 Ramon Novoa <rnovoa@artica.es>

* util/pandora_db.pl: Do not compact proc modules.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9585 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2014-03-13 15:29:20 +00:00
parent 5787f7d97e
commit c0075cad39
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2014-03-13 Ramon Novoa <rnovoa@artica.es>
* util/pandora_db.pl: Do not compact proc modules.
2014-03-13 Mario Pulido <mario.pulido@artica.es>
* pandora_server.redhat.spec: Added netflow directory

View File

@ -368,6 +368,7 @@ sub pandora_compactdb ($$) {
my %count_hash;
my %id_agent_hash;
my %value_hash;
my %module_proc_hash;
return if ($conf->{'_days_compact'} == 0 || $conf->{'_step_compact'} < 1);
@ -417,6 +418,20 @@ sub pandora_compactdb ($$) {
# Get interval data
foreach my $data (@data) {
my $id_module = $data->{'id_agente_modulo'};
if (! defined($module_proc_hash{$id_module})) {
my $module_type = get_db_value ($dbh, 'SELECT id_tipo_modulo FROM tagente_modulo WHERE id_agente_modulo = ?', $id_module);
# Mark proc modules.
if ($module_type == 2 || $module_type == 6 || $module_type == 9 || $module_type == 18 || $module_type == 21 || $module_type == 31) {
$module_proc_hash{$id_module} = 1;
}
else {
$module_proc_hash{$id_module} = 0;
}
}
# Skip proc modules!
next if ($module_proc_hash{$id_module} == 1);
if (! defined($value_hash{$id_module})) {
$value_hash{$id_module} = 0;