mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 00:34:46 +02:00
WIP discovery F3 app db my multiserver
Former-commit-id: a85c048a6d4e755b76a7e042e04cfebdfe69b6f4
This commit is contained in:
parent
74303168ac
commit
654e0c28f6
@ -1446,6 +1446,16 @@ sub db_scan($) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my @targets = split /,/, $self->{'task_data'}->{'subnet'};
|
||||||
|
|
||||||
|
my $i = 0;
|
||||||
|
foreach my $target (@targets) {
|
||||||
|
call('message', 'Checking target ' . $target, 10);
|
||||||
|
|
||||||
|
# Force target acquirement.
|
||||||
|
$self->{'task_data'}->{'dbhost'} = $target;
|
||||||
|
$self->{'task_data'}->{'target_index'} = $i++;
|
||||||
|
|
||||||
# Connect to target.
|
# Connect to target.
|
||||||
my $dbObj = PandoraFMS::Recon::Util::enterprise_new(
|
my $dbObj = PandoraFMS::Recon::Util::enterprise_new(
|
||||||
'PandoraFMS::Recon::Applications::'.$type,
|
'PandoraFMS::Recon::Applications::'.$type,
|
||||||
@ -1453,9 +1463,8 @@ sub db_scan($) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!defined($dbObj)) {
|
if (!defined($dbObj)) {
|
||||||
call('message', 'Cannot connect to target ' .'', 3);
|
call('message', 'Cannot connect to target ' . $target, 3);
|
||||||
$self->call('update_progress', -1);
|
next;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
my @modules;
|
my @modules;
|
||||||
@ -1494,8 +1503,14 @@ sub db_scan($) {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
print Dumper($data);
|
||||||
$self->call('create_agents', $data);
|
$self->call('create_agents', $data);
|
||||||
|
|
||||||
|
# Destroy item.
|
||||||
|
undef($dbObj);
|
||||||
|
}
|
||||||
|
|
||||||
# Update progress.
|
# Update progress.
|
||||||
# Done!
|
# Done!
|
||||||
$self->{'step'} = '';
|
$self->{'step'} = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user