Using existing Users and Groups with Director

We are using Director in addition to an existing Icinga installation in order to import hosts from NetBox.

I would like to add notifications to the imported hosts and notify existing users and groups. However, I am not able to select those in the notification template in director.

If I try to import the users and groups into Director using the CoreApi it fails because those objects already exist within Icinga. Also, using CoreApi, it only seems to import object_name an no other attributes.

Is there any way to realize this?

Could be some slight confusion, since “Users” as far as the director is concerned are actually “Contacts”

With that said, how are your contacts currently defined? It sounds to me like they are already defined, but you are trying to redefine them with Director using an API.

To use them within the director, you would need to completely manage them with the director. So your idea to import them is correct (the director kickstart will not help here). I would typically use the IDO database as I am more familiar with SQL, but both options should be valid. After importing them you need to remove them from the file based configuration so you can deploy again without duplicates. And with this you should be done and have the same valid configuration with just the way to manage the user and group objects changed.

Another option to consider is instead of doing the one time import looking for an import source like the active directory to sync them also in the future.

2 Likes

Thanks for your answers.
I decided to put everything that the director imports into a special group and have an apply rule outside of the director to add the notification groups and users.
However, I believe that the second answer would be correct for other people running into the same issue.

1 Like