diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index b3f4098a21..fa3c12173d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -3065,7 +3065,11 @@ while (1) { if (defined ($Conf{'parent_agent_name'})) { $xml_header .= "' parent_agent_name='" .$Conf{'parent_agent_name'}; } - + + if (defined ($Conf{'secondary_groups'})) { + $xml_header .= "' secondary_groups='" .$Conf{'secondary_groups'}; + } + if (defined ($Conf{'agent_mode'})) { if ($Conf{'agent_mode'} =~ m/no.?learn/ig) { $xml_header .= "' agent_mode='0"; diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 56bfc90d9e..189b8952d8 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -369,6 +369,9 @@ sub process_xml_data ($$$$$) { if (! defined ($agent_id)) { return; } + + # Update the secondary groups + enterprise_hook('add_secondary_groups_name', [$pa_config, $dbh, $agent_id, $data->{'secondary_groups'}]); # This agent is new. $new_agent = 1;