Zabbix <3 Zimbra
Zimbra Template
Download the Zimbra Template for Zabbix version 6.0.
In the Configuration
→ Templates
section users can configure and maintain templates. Click on Import to load the template YAML file:
zmcontrol_status
Prepare the Zimbra server, by adding the following line to the ROOT CRONTAB. This will put the output of the zmcontrol_status
on a file in /tmp
. It will run every 3 min:
crontab -u root -e
*/3 * * * * sudo -u zimbra /opt/zimbra/bin/zmcontrol status > /tmp/zmcontrol_status
This will generate the following file:
cat /tmp/zmcontrol_status
Host my.zimbra.com
amavis Running
antispam Running
antivirus Running
ldap Running
logger Running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running
Zabbix Agent
Add the following UserParameter to the zabbix_agentd.conf
file, or the zabbix_agentd.d
folder:
nano /etc/zabbix/zabbix_agentd.d/zimbra_template.conf
# Zimbra Monitor Template
UserParameter=zimbra.amavis.status,awk '/amavis/{print $2}' /tmp/zmcontrol_status
UserParameter=zimbra.antispam.status,awk '/antispam/{print $2}' /tmp/zmcontrol_status
UserParameter=zimbra.antivirus.status,awk '/antivirus/{print $2}' /tmp/zmcontrol_status
UserParameter=zimbra.mailbox.status,awk '/mailbox/{print $2}' /tmp/zmcontrol_status
UserParameter=zimbra.mta.status,awk '/mta/{print $2}' /tmp/zmcontrol_status
UserParameter=zimbra.zmconfigd.status,awk '/zmconfigd/{print $2}' /tmp/zmcontrol_status
UserParameter=zimbra.webmail.status,awk '/service webapp/{print $3}' /tmp/zmcontrol_status
UserParameter=zimbra.webadm.status,awk '/zimbraAdmin/{print $3}' /tmp/zmcontrol_status
UserParameter=zimbra.proxy.status,awk '/proxy/{print $2}' /tmp/zmcontrol_status
Zabbix Agent 2
The version 2 configuration file does not use this directory. But it imports conf files from:
Include=./zabbix_agent2.d/plugins.d/*.conf
So I am placing the Zimbra Template configuration there:
nano zabbix_agent2.d/plugins.d/zimbra_template.conf
And restart the agent with:
service zabbix-agent2 restart
service zabbix-agent2 status
Configure the Server
Now we can configure our server to use the Zimbra template:
Wait a while and verify the latest data received from your server. Note: the template maps RUNNING
with the value 0
. So seeing zeros is here a good thing: