mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Updated the Data Server to process agent aliases.
This commit is contained in:
parent
903d56e4ea
commit
0987b7a1f6
0
pandora_agents/unix/pandora_agent_installer
Normal file → Executable file
0
pandora_agents/unix/pandora_agent_installer
Normal file → Executable file
0
pandora_console/pandora_console_install
Normal file → Executable file
0
pandora_console/pandora_console_install
Normal file → Executable file
@ -2813,12 +2813,12 @@ Create a new entry in B<tagente> 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});
|
||||
|
@ -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;
|
||||
|
0
pandora_server/pandora_server_installer
Normal file → Executable file
0
pandora_server/pandora_server_installer
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user