Python script to integrate ldap to zabbix, automatizing user creation, based on group definition.
This code was made to help improve the integration between LDAP/AD with Zabbix.
Zabbix does already integrate with LDAP/AD, but only authentication. In order to
use it you have to manually add the user to Zabbix frontend.
⚠ Warnings
The script at the moment only creates and deletes users based on a single AD group, if you
plan to have separate functions like viewer, editor and admin, it is not implemented yet.
You can create a cron job that calls the script “zabbix_ldap_integration.py” and
receives the connection conf file like the example:
Download or clone the repository;
clone https://github.com/GLutzBR/zabbix-ldap-integration.git /PATH/OF/YOUR/CHOICE/
Edit the connection.conf example;
Create the crontab;
sudo crontab -e
Insert the following line:
*/30 * * * * python3 /PATH/OF/YOUR/CHOICE/zabbix_ldap_integration.py < connection.conf > /dev/null
You can use the following ansible script:
Ansible Zabbix LDAP Integration