Could someone advise me, if there is a possibility to get icinga2 notification data (email, groups, periods etc) from a LDAP ressource (openldap, 389 dirsrv) ?
For sure it is, but to give you a better answer some more details are needed.
Are you using the director? If no, you would need to script an import of the data yourself. If yes, you can make use of the director’s import capabilities. Then it depends on what you need, importing user groups and users is pretty straight forward.
An example one of my colleagues has written down can be found in our blog at https://www.netways.de/blog/2020/10/01/user-aus-ldap-in-icinga-director-importieren/ (unfortunately in German, but it should be still understandable when I look at screenshots and commands)
Cool! Thanks for your reply. I was looking to a more dynamic solution, doing a lookup on the fly a notification is send, rather than importing a bulk of users/groups once. But maybe that is over the top. And no, I’m not using director.
Ok, for on the fly I also see no problem. It will only need a custom script and a notification and user to trigger this script. I have done similar things in the past, but all of this was very customer specific so I can not give you a good example.
And also keep in mind that you have another runtime dependency so implement a fallback for when LDAP is not available and/or a different type of notification for the LDAP server.
Thanks Dirk! We decided not to add another dependency and better use predefined mail aliases.