Create an event when an agent can't be created because it can't be assigned to a group.
This commit is contained in:
parent
24fea04c8f
commit
15fb7ff2e3
|
@ -301,10 +301,12 @@ sub process_xml_data ($$$$$) {
|
|||
if (defined ($data->{'group'}) && $data->{'group'} ne '') {
|
||||
$group_id = get_group_id ($dbh, $data->{'group'});
|
||||
if (! defined (get_group_name ($dbh, $group_id))) {
|
||||
pandora_event ($pa_config, "Unable to create agent '$agent_name': group '" . $data->{'group'} . "' does not exist.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
||||
logger($pa_config, "Group " . $data->{'group'} . " does not exist.", 3);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
pandora_event ($pa_config, "Unable to create agent '$agent_name': autocreate_group $group_id does not exist. Edit the pandora_server.conf file and change it.", 0, 0, 0, 0, 0, 'error', 0, $dbh);
|
||||
logger($pa_config, "Group id $group_id does not exist (check autocreate_group config token).", 3);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue