WIP discovery F3

Former-commit-id: 493d05714a31c2f91f7b8ea5445397ebf1c526d7
This commit is contained in:
fbsanchez 2019-04-03 21:55:11 +02:00
parent 60f37eac57
commit 74303168ac
2 changed files with 11 additions and 4 deletions

View File

@ -494,9 +494,16 @@ sub PandoraFMS::Recon::Base::create_agents($$) {
# Add modules.
if (ref($modules) eq "ARRAY") {
foreach my $module (@{$modules}) {
pandora_process_module(
$pa_config, {'data' => $module->{'value'}}, $current_agent, $module,
$module->{'type'}, '', time(), $server_id, $dbh
my %data_translated = map { $_ => [ $module->{$_} ] } keys %{$module};
# Translate fields.
PandoraFMS::DataServer::process_module_data (
$pa_config, \%data_translated,
$server_id, $current_agent,
$module->{'name'}, $module->{'type'},
$agent->{'interval'},
strftime ("%Y/%m/%d %H:%M:%S", localtime()),
$dbh, $force_processing
);
}
}

View File

@ -1488,7 +1488,7 @@ sub db_scan($) {
'interval' => $self->{'task_data'}->{'interval_sweep'},
'id_group' => $self->{'task_data'}->{'id_group'},
'address' => $dbObj->get_host(),
'description' => '',
},
'module_data' => \@modules,
}