Coder Social home page Coder Social logo

zbx-zimbra-stats's Introduction

zbx-zimbra-stats

Zabbix Template and script for monitoring Zimbra statistics (traffic and stats)

Template

Uses two scripts to populate item:

  • zimbraTrafficStats.sh - Script using /opt/zimbra/common/bin/pflogsumm.pl
  • zimbraGetStats.sh - Script using /opt/zimbra/bin/zmsoap and zabbix_sender

Scripts

Grabs info from these providers (Zimbra related tools):

  • /opt/zimbra/bin/zmsoap -z -t admin GetServerStatsRequest
  • /opt/zimbra/common/bin/pflogsumm.pl

Files

  • crontab.txt - cron configuration
  • userparameter_zimbra.traffic.conf - Zabbix UserParameter
  • zimbra_zabbix - sudo file for zabbix user

Prerequisites

  • Zabbix Server that can process data being sent.
  • zabbix_agent(active) + zabbix_sender on the monitored host.

Screens

alt_text alt_text

HOWTO

  1. Import Template Zimbra Statistics.xml on the Zabbix Server.
  2. Copy all files to the monitored host.
  3. Copy userparameter file into the includes folder (Default: /etc/zabbix/zabbix_agentd.d/)
  4. Copy the script files into your Zabbix folder (Default: /etc/zabbix)
    1. Make sure the scripts are executable.
    2. Optional: create a scripts directory inside /etc/zabbix/
  5. Copy the zimbra_zabbix file into /etc/sudoers.d/
    1. Check permissions, they should be 0440
  6. Add the line from crontab.txt to the end of the zimbra users crontab.
    1. Remember to change the hostname.

Notes

To deploy via ansible using dj.wasabi's zabbix-agent role (https://galaxy.ansible.com/dj-wasabi/zabbix-agent)

  1. Follow documentation for the role

    1. Add the scripts to files/scripts/
    2. Add userparameter files to templates/userparameters/
  2. Add these tasks to playbook after the role has been run:

     - hosts: all 
     	tasks:  
     	- name: Add sudoers file for the zabbix user  
     	copy:  
     		src: roles/dj-wasabi.zabbix-agent/files/sudo/zimbra_zabbix  
     		dest: /etc/sudoers.d/zimbra_zabbix  
     		mode: 0440  
     		validate: 'visudo -cf %s'  
     	become: yes  
     	- name: Add cron configuration for zimbraGetStats.sh  
     	cron:  
     		name: "Run ZimbraGetStats.sh every 1 min."  
     		user: zimbra  
     		job: /etc/zabbix/scripts/zimbra/zimbraGetStats.sh {{ ansible_fqdn }} >/dev/null 2>&1  
     	become: yes  
    

zbx-zimbra-stats's People

Contributors

goid1989 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.