项目作者: glutzm

项目描述 :
Python script to integrate ldap to zabbix, automatizing user creation, based on group definition.
高级语言: Python
项目地址: git://github.com/glutzm/zabbix-ldap-integration.git
创建时间: 2019-05-10T18:51:30Z
项目社区:https://github.com/glutzm/zabbix-ldap-integration

开源协议:MIT License

下载


Zabbix LDAP Integration

Description

This code was made to help improve the integration between LDAP/AD with Zabbix.

Problem

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.

Requirements

  • Python 3.x.x
    • pyzabbix
    • ldap3
  • Zabbix 4.2 (only version tested)

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.

How to use

You can create a cron job that calls the script “zabbix_ldap_integration.py” and
receives the connection conf file like the example:

Method 1

  1. Download or clone the repository;

    1. clone https://github.com/GLutzBR/zabbix-ldap-integration.git /PATH/OF/YOUR/CHOICE/
  2. Edit the connection.conf example;

  3. Create the crontab;

    1. sudo crontab -e
  4. Insert the following line:

    1. */30 * * * * python3 /PATH/OF/YOUR/CHOICE/zabbix_ldap_integration.py < connection.conf > /dev/null

Method 2

You can use the following ansible script:
Ansible Zabbix LDAP Integration