discovery.app.mysql rc1

Former-commit-id: 51304e872d375b480cbbf88d058b1804106afb98
This commit is contained in:
fbsanchez 2019-04-04 16:05:16 +02:00
parent ce9f9eab4e
commit 56f2acbbf1

View File

@ -453,13 +453,18 @@ sub PandoraFMS::Recon::Base::create_agents($$) {
} }
my $agent_id; my $agent_id;
my $os_id = get_os_id($dbh, $agent->{'os'});
if (!$os_id) {
$os_id = get_os_id($dbh, 'Other');
}
if (!$current_agent) { if (!$current_agent) {
# Create agent. # Create agent.
$agent_id = pandora_create_agent( $agent_id = pandora_create_agent(
$pa_config, $pa_config->{'servername'}, $agent->{'agent_name'}, $pa_config, $pa_config->{'servername'}, $agent->{'agent_name'},
$agent->{'address'}, $agent->{'id_group'}, $parent_id, $agent->{'address'}, $agent->{'id_group'}, $parent_id,
get_os_id($dbh, $agent->{'os'}), $agent->{'description'}, $os_id, $agent->{'description'},
$agent->{'interval'}, $dbh, $agent->{'timezone_offset'} $agent->{'interval'}, $dbh, $agent->{'timezone_offset'}
); );