This is my personale Samba4 AD Template for Zabbix 5
Until today 26/6/2021 there is no decent Zabbix Template (just my own opinion) for monitoring Samba4 AD so I am still using Nagios just for this, until today. Enjoy! This template is tested wind Zabbix Server 5, Centos 7 DC and Zabbix Agent2.
- install jq with yum or apt install jq
sudo apt-get install jq
- copy samba4_ad.conf in your zabbix-agent2.d etc folder
Es: /etc/zabbix/zabbix_agentd2.d/samba4_ad.conf
-
add zabbix user to sudo with visudo
-
allows 'zabbix' user to run all commands without password. zabbix ALL=NOPASSWD: ALL
-
Allow active-check in your /etc/zabbix/zabbix_agentd2.conf and AllowKey=system.run[*]
-
copy samba4_ad.sh in /usr/local/bin
-
add cron tasks like:
*/15 * * * * /usr/local/bin/samba4_ad.sh doJson > /dev/null 2>&1
0 */2 * * * /usr/local/bin/samba4_ad.sh doDbCheck > /dev/null 2>&1