diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer old mode 100644 new mode 100755 diff --git a/pandora_console/pandora_console_install b/pandora_console/pandora_console_install old mode 100644 new mode 100755 diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 0795b3402b..51f74e789e 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -2813,12 +2813,12 @@ Create a new entry in B optionaly with position information =cut ########################################################################## -sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$) { +sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$$) { my ($pa_config, $server_name, $agent_name, $address, $group_id, $parent_id, $os_id, $description, $interval, $dbh, $timezone_offset, $longitude, $latitude, $altitude, $position_description, - $custom_id, $url_address, $agent_mode) = @_; + $custom_id, $url_address, $agent_mode, $alias) = @_; logger ($pa_config, "Server '$server_name' creating agent '$agent_name' address '$address'.", 10); @@ -2844,7 +2844,8 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$) { 'modo' => $agent_mode, 'custom_id' => $custom_id, 'url_address' => $url_address, - 'timezone_offset' => $timezone_offset + 'timezone_offset' => $timezone_offset, + 'alias' => $alias }); my $agent_id = db_insert ($dbh, 'id_agente', "INSERT INTO tagente $columns", @{$values}); diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 3accde29f1..76af4d1d97 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -336,9 +336,11 @@ sub process_xml_data ($$$$$) { my $description = ''; $description = $data->{'description'} if (defined ($data->{'description'})); + my $alias = ''; + $alias = $data->{'agent_alias'} if (defined ($data->{'agent_alias'})); $agent_id = pandora_create_agent($pa_config, $pa_config->{'servername'}, $agent_name, $address, $group_id, $parent_id, $os, - $description, $interval, $dbh, $timezone_offset, undef, undef, undef, undef, $custom_id, $url_address, $agent_mode); + $description, $interval, $dbh, $timezone_offset, undef, undef, undef, undef, $custom_id, $url_address, $agent_mode, $alias); if (! defined ($agent_id)) { return; diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer old mode 100644 new mode 100755