Skip to content

toky0/prometheus_zimbra_monitoring

 
 

Repository files navigation

Zimbra Dashboard

Zimbra Prometheus Exporter + Grafana Dashboard

Demo

The following environment is tested:

  • CentOS 7
  • Zimbra 8.8.8
  • Python 3.6 & pip3
  • Prometheus 2.18
  • Grafana 8.2.5

yum install python3-pip
pip3 install flask
pip3 install prometheus_client
pip3 install psutil
pip3 install requests
pip3 install waitress

wget https://raw.githubusercontent.com/jasoncheng7115/zimbra_dashboards/main/zimbra_exporter.py -O /opt/zimbra_exporter.py
chmod +x /opt/zimbra_exporter.py

wget https://raw.githubusercontent.com/jmutai/telegraf-ansible/master/templates/zimbra_pflogsumm.pl.j2 -O /opt/zimbra_pflogsumm.pl
chmod +x /opt/zimbra_pflogsumm.pl

p.s: the zimbra part of the stats information uses jmutai's "zimbra_pflogsumm.pl" to get log statistics.

Required Modified variables in the zimbra_exporter.py:

PORT_EXPORTER = 9093

MAILSERVER = 'mail.domain.xy'
EXCLUDE_DOMAIN = '' # If you want to filter out a specific domain, please add it here.

PORT_SMTP = '25'
PORT_IMAP = '143'
PORT_IMAPS = '993'
PORT_POP3 = '110'
PORT_POP3S = '995'
PORT_WEBCLIENT = '443'

Add Prometheus scrape config:

 # Zimbra Exporter
  - job_name: 'zimbra'
    scrape_interval: 60s
    scrape_timeout: 30s
    honor_labels: true
    static_configs:
    - targets: ['mail.domain.xy:9093']

Set to run as a service:

wget https://raw.githubusercontent.com/jasoncheng7115/zimbra_dashboards/main/zimbra_exporter.service -O /etc/systemd/system/zimbra_exporter.service

systemctl daemon-reload
systemctl start zimbra_exporter
systemctl enable zimbra_exporter

About

Zimbra + Prometheus Exporter + Grafana Dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%