├── zabbix_agentd.conf.d
├── bind.conf
├── amavis.conf
├── dovecot.conf
├── apc.conf
├── inventory.conf
├── nginx.conf
├── squid.conf
├── sensors.conf
├── yum.conf
├── fail2ban.conf
├── opcache.conf
├── selinux.conf
├── exim.conf
├── smart.conf
├── iptables.conf
├── ups.conf
├── redis.conf
├── nscd.conf
├── postfix.conf
├── mysql-slave.conf
├── memory.conf
├── powermt.conf
├── cpanel.conf
├── bcu.conf
├── linux.conf
├── omreport.conf
└── rabbit.conf
├── .my.cnf
├── bin
├── check-update.sh
├── swap_enabled.sh
├── arduino.py
├── hdd_discovery.sh
├── lm_sensors.sh
├── pgsql_find_db.sh
├── apc-stats.php
├── mysql_discover_tables.sh
├── rabbitmq.sh
├── rabbitmqctl.sh
├── memory-check.sh
├── mysql_print_table_size.sh
├── blacklist.sh
├── nginx-check.sh
├── apc-check.php
├── opcache.php
└── rabbit.php
├── php.ini
├── sudoers.d
└── zabbix
└── templates
├── Template App mdadm.xml
├── Template App Spamassassin.xml
├── Template App Rserve.xml
├── Template App Unicorn.xml
├── Template App Unicorn Rails.xml
├── Template App SPAM Blacklist.xml
├── Template App Percona XtraBackup.xml
├── Template SELinux.xml
├── Template App ClamAV.xml
├── Template App Solr.xml
├── Template Specific Process Memory Usage.xml
├── Template App Monit.xml
├── Template App php-fpm.xml
├── Template App OpenVPN.xml
├── Template App Amavisd.xml
├── Template Device SNMP Generic.xml
├── Template App PHP.xml
├── Template App OpenDKIM.xml
├── Template App Etherpad.xml
├── Template App vsftpd.xml
├── Template App Pure-FTPd.xml
├── Template App BIND.xml
├── Template App Dovecot.xml
├── Template App Wowza.xml
├── Template App Fail2Ban.xml
├── Template App Zabbix Agent - Debian.xml
└── Template App Exim.xml
/zabbix_agentd.conf.d/bind.conf:
--------------------------------------------------------------------------------
1 | UserParameter=bind.version, named -v
--------------------------------------------------------------------------------
/.my.cnf:
--------------------------------------------------------------------------------
1 | [client]
2 | user=zabbix
3 | password='ha7jqnlacwefrs'
4 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/amavis.conf:
--------------------------------------------------------------------------------
1 | UserParameter=amavis.version, amavisd -V
2 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/dovecot.conf:
--------------------------------------------------------------------------------
1 | UserParameter=dovecot.version, dovecot --version
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/apc.conf:
--------------------------------------------------------------------------------
1 | UserParameter=apc[*],php /etc/zabbix/bin/apc-check.php $1
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/inventory.conf:
--------------------------------------------------------------------------------
1 | UserParameter=facter[*], HOME=/etc/zabbix facter $1
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/nginx.conf:
--------------------------------------------------------------------------------
1 | UserParameter=nginx[*],/etc/zabbix/bin/nginx-check.sh "$1" "$2"
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/squid.conf:
--------------------------------------------------------------------------------
1 | UserParameter=squid.version,squid -v | head -1 | cut -d ' ' -f4
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/sensors.conf:
--------------------------------------------------------------------------------
1 | UserParameter=lm_sensors[*], sh /etc/zabbix/bin/lm_sensors.sh "$1"
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/yum.conf:
--------------------------------------------------------------------------------
1 | UserParameter=yum_update_count,cat /tmp/yum-update-pending | wc -l
2 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/fail2ban.conf:
--------------------------------------------------------------------------------
1 | UserParameter=fail2ban[*],sudo /sbin/iptables -S fail2ban-$1 | grep -c 'DROP'
2 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/opcache.conf:
--------------------------------------------------------------------------------
1 | UserParameter=opcache[*], curl --silent http://127.0.0.1/zabbix/opcache.php?item=$1
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/selinux.conf:
--------------------------------------------------------------------------------
1 | UserParameter=selinux-enabled, [ "$(getenforce)" = "Enforcing" ] && echo 1 || echo 0
2 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/exim.conf:
--------------------------------------------------------------------------------
1 | UserParameter=exim.version, exim -bV | head -1 | cut -d " " -f 3
2 | UserParameter=mailqueue-exim,sudo exim -bp | awk '{print $3}' | grep -c '^[0-9A-Z]'
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/smart.conf:
--------------------------------------------------------------------------------
1 | UserParameter=hdd.smart[*],sudo smartctl -A $1 | grep $2 | awk '{print $$10}' | tail -1
2 | UserParameter=hdd_discovery, /etc/zabbix/bin/hdd_discovery.sh
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/iptables.conf:
--------------------------------------------------------------------------------
1 | UserParameter=firewall-enabled, sudo /sbin/iptables -L INPUT -n | grep -ci 'tcp dpts:10050'
2 | UserParameter=firewall-md5, sudo /sbin/iptables -L INPUT -n | cksum | cut -d " " -f 1
3 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/ups.conf:
--------------------------------------------------------------------------------
1 | UserParameter=ups.apcacces[*],apcaccess | grep "^$1" |cut -d ":" -f2 | sed 's/^[\ ]*//g '| cut -d " " -f1
2 | UserParameter=ups.lastdate, apcaccess | grep XONBATT | cut -d ":" -f 2,3 | sed 's/^[\ ]//g'
--------------------------------------------------------------------------------
/bin/check-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | day=$(date +%e)
3 | if ((day <= 7)) ; then
4 | result=`/usr/bin/yum -q check-update | grep -v "^$"`
5 | echo -n "$result" > /tmp/yum-update-pending
6 | chown zabbix.zabbix /tmp/yum-update-pending
7 | fi
8 |
--------------------------------------------------------------------------------
/bin/swap_enabled.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | swap=$(free -m | grep -i swap | awk '{ print $2 }')
4 |
5 | if [ "$swap" != "0" ]; then
6 | echo '{"data":[{"{#TOTAL}":"total", "{#FREE}":"free", "{#PFREE}":"pfree", "{#PUSED}":"pused" } ]}'
7 | fi
8 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/redis.conf:
--------------------------------------------------------------------------------
1 | UserParameter=redis[*],redis-cli info | grep $1":" | cut -d ':' -f 2
2 | UserParameter=redis-ping,redis-cli ping | grep -c PONG
3 | UserParameter=redis.version, redis-server --version | cut -d " " -f 3 | cut -d "=" -f 2
4 |
--------------------------------------------------------------------------------
/php.ini:
--------------------------------------------------------------------------------
1 | [PHP]
2 | engine = On
3 | expose_php = Off
4 | max_execution_time = 300
5 | max_input_time = 300
6 | memory_limit = 128M
7 | error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING
8 | display_errors = Off
9 |
10 | [Date]
11 | date.timezone = "Etc/UTC"
12 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/nscd.conf:
--------------------------------------------------------------------------------
1 | # Requires
2 | # zabbix ALL=(ALL) NOPASSWD: /usr/sbin/nscd -g
3 | # in /etc/sudoers
4 | UserParameter=nscd[*],sudo /usr/sbin/nscd -g | grep "$1" | awk '{ print $ 1 }'
5 | UserParameter=nscd-hosts[*],sudo /usr/sbin/nscd -g | grep "hosts cache:" -A 22 | grep "$1" | awk '{ print $ 1 }'
6 |
--------------------------------------------------------------------------------
/bin/arduino.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import serial
3 | import sys
4 | import time
5 |
6 | ser=serial.Serial('/dev/ttyACM0', 9600, timeout=0.5)
7 | ser.open()
8 | try:
9 | time.sleep(2)
10 | ser.flush()
11 | ser.write(sys.argv[1]+"\n")
12 | response=ser.readline()
13 | print response
14 | # ser.close()
15 | except:
16 | print " ERROR "
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/postfix.conf:
--------------------------------------------------------------------------------
1 | UserParameter=postfix.version, postconf -d mail_version | cut -d '=' -f 2 | tr -d " "
2 | UserParameter=mailqueue-postfix,mailq 2>&1 | grep -v 'Mail queue is empty' | grep -c '^[0-9A-Z]'
3 | UserParameter=mailqueue-postfix-queue[*], sudo find /var/spool/postfix/ -type f | grep $1 | grep -v -e "/pid/" -e "/defer/" | wc -l
--------------------------------------------------------------------------------
/bin/hdd_discovery.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | disks=`ls -l /dev/sd* | awk '{print $NF}' | sed 's/[0-9]//g' | uniq`
3 | echo -n "{\"data\":["
4 |
5 | comma=1
6 | for disk in $disks
7 | do
8 | if [ $comma -eq 0 ]; then
9 | echo -n ","
10 | fi
11 | comma=0
12 | echo -n "{\"{#DISKNAME}\":\"$disk\",\"{#SHORTDISKNAME}\":\"${disk:5}\"}"
13 | done
14 |
15 | echo -n "]}"
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/mysql-slave.conf:
--------------------------------------------------------------------------------
1 | UserParameter=repSBM,echo "show slave status\G;" | HOME=/etc/zabbix mysql | grep 'Seconds_Behind_Master' | awk '{print $2}'
2 | UserParameter=repIOrun,echo "show slave status\G;" | HOME=/etc/zabbix mysql | grep -c 'Slave_IO_Running: Yes'
3 | UserParameter=repSQLrun,echo "show slave status\G;" | HOME=/etc/zabbix mysql | grep -c 'Slave_SQL_Running: Yes'
--------------------------------------------------------------------------------
/bin/lm_sensors.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cachefile='/tmp/lm_sensors.log'
4 | if [ -f $cachefile ]; then
5 | cachefileage=$(($(date +%s) - $(stat -c %Y $cachefile)))
6 | if [ $cachefileage -gt 300 ]; then
7 | sensors > $cachefile
8 | fi
9 | else
10 | sensors > $cachefile
11 | fi
12 |
13 | cat $cachefile | grep "$1" | cut -d ":" -f 2 | sed -e 's/^[ \t]*//' | cut -d " " -f 1 | tr -d "+°C?"
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/memory.conf:
--------------------------------------------------------------------------------
1 | # ============================================================
2 | # Author: chusiang / chusiang (at) drx.tw
3 | # Filename: memory_sum.conf
4 | # Modified: 2016-10-24 13:05
5 | # Description: Custom UserParameter for monitoring specific process memory used.
6 | # ===========================================================
7 |
8 | UserParameter=memory_sum[*],/etc/zabbix/bin/memory-check.sh "$1"
9 |
--------------------------------------------------------------------------------
/bin/pgsql_find_db.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # If you want to monitor "foo" and "bar" databases, you set the GETDB as
3 | # GETDB="select datname from pg_database where datname in ('foo','bar');"
4 | # CREATE USER zabbix WITH PASSWORD 'asfrtgrg432f';
5 | # GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO zabbix;
6 |
7 | GETDB="select datname from pg_database where datistemplate = 'f';"
8 |
9 | for dbname in $(psql -U zabbix -d postgres -t -c "${GETDB}"); do
10 | dblist="$dblist,"'{"{#DBNAME}":"'$dbname'"}'
11 | done
12 | echo '{"data":['${dblist#,}' ]}'
--------------------------------------------------------------------------------
/bin/apc-stats.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/powermt.conf:
--------------------------------------------------------------------------------
1 | UserParameter=powermt-path-list, echo -e "{\n\"data\":["; sudo /sbin/powermt display dev=all | tail -n+9 | grep -v "^$" | awk '{ print "{\"{#PATH}\":\""$3"\" }," }' | head -c -2; echo -e "]\n}";
2 | UserParameter=powermt-device-state, sudo /sbin/powermt display dev=all 2>&1 | grep -c state=alive
3 | UserParameter=powermt-path-mode[*], sudo /sbin/powermt display dev=all 2>&1 | grep "$1" | awk '{ print $ 6 }' | grep -c active
4 | UserParameter=powermt-path-state[*], sudo /sbin/powermt display dev=all 2>&1 | grep "$1" | awk '{ print $ 7 }' | grep -c alive
5 | UserParameter=powermt-path-errors[*], sudo /sbin/powermt display dev=all | grep "$1" | awk '{ print $ 9 }'
6 |
--------------------------------------------------------------------------------
/bin/mysql_discover_tables.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | comma=1
4 | echo -n "{\"data\":["
5 |
6 | if [ -e /san/mysql-fs/mysql ]; then
7 | path="/san/mysql-fs/mysql/"
8 | else
9 | path="/var/lib/mysql/"
10 | fi
11 |
12 |
13 | for i in $(sudo /bin/find $path -type f -printf %p+%s= | tr "=" "\n" | grep -v "\/mysql\/mysql\/" | grep "\.ibd" | cut -d "+" -f 1 | sed 's/@002d/\-/g' | cut -d "/" -f 5- | sed 's/.ibd//g' ); do
14 |
15 | dbname=$(echo $i | cut -d '/' -f 1)
16 | tblname=$(echo $i | cut -d '/' -f 2)
17 |
18 | if [ $comma -eq 0 ]; then
19 | echo -n ","
20 | fi
21 | comma=0
22 | echo -n "{\"{#DBNAME}\":\"$dbname\",\"{#TABLENAME}\":\"$tblname\"}"
23 |
24 | done
25 |
26 | echo -n "]}"
27 |
--------------------------------------------------------------------------------
/bin/rabbitmq.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # =======================
4 | cachefile='/tmp/rabbitmq.log'
5 | command='sudo /usr/bin/php /etc/zabbix/bin/rabbit.php'
6 | # =======================
7 |
8 | random=$RANDOM
9 |
10 | if [ ! -e $cachefile ]; then
11 | touch -d "2 hours ago" $cachefile
12 | fi
13 |
14 | cachefileage=$(($(date +%s) - $(stat -c %Y $cachefile)))
15 | process_running=$(ps aux | grep rabbit.php | grep -v "grep" | wc -l)
16 |
17 | if [ "$cachefileage" -gt 60 ] && [ "$process_running" -eq 0 ]; then
18 | output=$($command 2>&1)
19 |
20 | if [ $? -eq 0 ]; then
21 | echo "$output" > $cachefile.$random
22 | mv $cachefile.$random $cachefile
23 | chown zabbix.zabbix $cachefile
24 | fi
25 | fi
26 |
27 | cat $cachefile
--------------------------------------------------------------------------------
/bin/rabbitmqctl.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # =======================
4 | cachefile='/tmp/rabbitmqctl.log'
5 | command='sudo /usr/sbin/rabbitmqctl status'
6 | # =======================
7 |
8 | random=$RANDOM
9 |
10 | if [ ! -e $cachefile ]; then
11 | touch -d "2 hours ago" $cachefile
12 | fi
13 |
14 | cachefileage=$(($(date +%s) - $(stat -c %Y $cachefile)))
15 | process_running=$(ps aux | grep "rabbitmqctl status" | grep -v "grep" | wc -l)
16 |
17 | if [ "$cachefileage" -gt 60 ] && [ "$process_running" -eq 0 ]; then
18 | output=$($command 2>&1)
19 |
20 | if [ $? -eq 0 ]; then
21 | echo "$output" > $cachefile.$random
22 | mv $cachefile.$random $cachefile
23 | chown zabbix.zabbix $cachefile
24 | fi
25 | fi
26 |
27 | cat $cachefile
--------------------------------------------------------------------------------
/bin/memory-check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # ============================================================
3 | # Author: chusiang / chusiang (at) drx.tw
4 | # Blog: http://note.drx.tw
5 | # Filename: memory-check.sh
6 | # Modified: 2016-10-24 13:05
7 | # Description: Monitoring memory usage of specific process.
8 | #
9 | # The RSS (resident set size) is mean memory used in KB, not B,
10 | # so we need to `* 1024` for mapping zabbix-server.
11 | #
12 | # Reference:
13 | #
14 | # 1. Total memory used by Python process? | Stack Overflow
15 | # - http://stackoverflow.com/a/40173829/686105
16 | # 2. linux - ps aux output meaning | Super User
17 | # - http://superuser.com/a/117921/205255
18 | #
19 | # ===========================================================
20 |
21 | PROCESS_NAME="$1"
22 | ps aux | grep $PROCESS_NAME | awk '{ sum=sum+$6 }; END { print sum*1024 }'
23 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/cpanel.conf:
--------------------------------------------------------------------------------
1 | UserParameter=whmapi.php_get_vhost_versions[*], sudo /usr/sbin/whmapi1 php_get_vhost_versions | grep -c '$1'; true
2 | UserParameter=whmapi.listsuspended, sudo /usr/sbin/whmapi1 listsuspended | grep -c user; true
3 | UserParameter=whmapi.twofactorauth_policy_status, sudo /usr/sbin/whmapi1 twofactorauth_policy_status | grep is_enabled | awk '{print $2}'
4 | UserParameter=whmapi.cphulk_status, sudo /usr/sbin/whmapi1 cphulk_status | grep is_enabled | awk '{print $2}'
5 | UserParameter=whmapi.get_cphulk_brutes, sudo /usr/sbin/whmapi1 get_cphulk_brutes | grep -c ip; true
6 | UserParameter=whmapi.get_cphulk_excessive_brutes, sudo /usr/sbin/whmapi1 get_cphulk_excessive_brutes | grep -c ip; true
7 | UserParameter=whmapi.get_cphulk_failed_logins, sudo /usr/sbin/whmapi1 get_cphulk_failed_logins | grep -c ip; true
8 | UserParameter=whmapi.cpgreylist_status, sudo /usr/sbin/whmapi1 cpgreylist_status | grep is_enabled | awk '{print $2}'
9 |
--------------------------------------------------------------------------------
/bin/mysql_print_table_size.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cachefile='/tmp/mysqldbsize.log'
4 | random=$RANDOM
5 |
6 | if [ ! -e $cachefile ]; then
7 | touch -d "2 hours ago" $cachefile
8 | fi
9 |
10 | if [ $# -ne 2 ]; then
11 | echo "Usage: $0 dbname tablename"
12 | exit 1
13 | fi
14 |
15 | if [ -e /san/mysql-fs/mysql ]; then
16 | path="/san/mysql-fs/mysql/"
17 | else
18 | path="/var/lib/mysql/"
19 | fi
20 |
21 | cachefileage=$(($(date +%s) - $(stat -c %Y $cachefile)))
22 | process_running=$(ps aux | grep 'find /var/lib/mysql' | grep -v "grep" | wc -l)
23 |
24 | if [ "$cachefileage" -gt 60 ] && [ "$process_running" -eq 0 ]; then
25 |
26 | sudo /bin/find $path -type f -printf %p+%s= | tr "=" "\n" | grep -v "\/mysql\/mysql\/" | grep "\.ibd" | sed 's/@002d/\-/g' > $cachefile.$random
27 |
28 | if [ $? -eq 0 ]; then
29 | mv $cachefile.$random $cachefile
30 | chown zabbix.zabbix $cachefile
31 | fi
32 | fi
33 |
34 | grep "/$1/" $cachefile | grep "/$2\.ibd" | cut -d "+" -f 2
35 |
36 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/bcu.conf:
--------------------------------------------------------------------------------
1 | UserParameter=bcu-adapter-list, echo -e "{\n\"data\":["; sudo bcu adapter --list | head -n-1 | tail -n+4 | awk '{ print $1 }' | awk '{ print "{\"{#ADAPTER}\":\""$0"\"}," }' | head -c -2; echo -e "]\n}";
2 | UserParameter=bcu-adapter-state[*], sudo bcu adapter --query $1 | grep status | grep -c good
3 | UserParameter=bcu-adapter-query[*], sudo bcu adapter --query $1 | grep "$2" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
4 | UserParameter=bcu-adapter-temperature[*], sudo bcu diag --tempshow $1 | cut -d ":" -f 2 | sed 's/^[ \t]*//g' | cut -d " " -f 1
5 | UserParameter=bcu-port-list, echo -e "{\n\"data\":["; sudo bcu port --list -terse | head -n-1 | tail -n+5 | awk '{ print $1 }' | awk '{ print "{\"{#PORT}\":\""$0"\"}," }' | head -c -2; echo -e "]\n}";
6 | UserParameter=bcu-port-state[*], sudo bcu port --query $1 | grep "state" | grep -c "Linkup"
7 | UserParameter=bcu-port-speed[*], sudo bcu port --speed $1 | grep "Current" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
8 | UserParameter=bcu-port-stats[*], sudo bcu port --stats $1 | grep "$2" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
9 | UserParameter=bcu-lport-stats[*], sudo bcu lport --stats $1 | grep "$2" | cut -d ":" -f 2 | sed 's/^[ \t]*//g'
10 |
--------------------------------------------------------------------------------
/sudoers.d/zabbix:
--------------------------------------------------------------------------------
1 | zabbix ALL=(ALL) NOPASSWD: /sbin/iptables -L INPUT -n
2 | zabbix ALL=(ALL) NOPASSWD: /sbin/iptables -S fail2ban-permanent
3 | zabbix ALL=(ALL) NOPASSWD: /sbin/iptables -S fail2ban-banned
4 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/nscd -g
5 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/smartctl
6 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl
7 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/php /etc/zabbix/bin/rabbit.php
8 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/exim -bp
9 | zabbix ALL=(ALL) NOPASSWD: /bin/find /var/spool/postfix/ -type f
10 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/httpd -v
11 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/dmidecode
12 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/stat
13 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/md5sum
14 | zabbix ALL=(ALL) NOPASSWD: /bin/find /var/lib/mysql/ -type f -printf %p+%s=
15 | zabbix ALL=(ALL) NOPASSWD: /etc/zabbix/bin/haproxy.sh
16 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/du
17 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/salt-key --list all --output txt
18 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/supervisorctl status
19 | zabbix ALL=(ALL) NOPASSWD: /bin/ls
20 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/amavisd-agent -c 1
21 | zabbix ALL=(ALL) NOPASSWD: /usr/sbin/whmapi1
22 | zabbix ALL=(vps:vps) NOPASSWD: /usr/bin/VBoxManage
23 | zabbix ALL=(postgres:postgres) NOPASSWD: /usr/bin/psql
24 | Defaults:zabbix !requiretty
25 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/linux.conf:
--------------------------------------------------------------------------------
1 | UserParameter=nfs[*],df | grep -cw $1
2 | UserParameter=mount[*],df | grep -c $1
3 | UserParameter=mount2[*],mount | grep -c '$1'
4 | UserParameter=stat[*],sudo stat -c "%$2" $1
5 | UserParameter=mdstat,egrep -ce "F|_" /proc/mdstat
6 | UserParameter=netstat[*], ss -nat | grep -c $1
7 | UserParameter=chkconfig[*], chkconfig --list | grep "$1" | cut -d ":" -f 5 | grep -c on
8 | UserParameter=sockstat.sockets,cat /proc/net/sockstat|grep sockets|cut -d' ' -f 3
9 | UserParameter=sockstat.tcp.inuse,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 3
10 | UserParameter=sockstat.tcp.orphan,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 5
11 | UserParameter=sockstat.tcp.timewait,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 7
12 | UserParameter=sockstat.tcp.allocated,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 9
13 | UserParameter=sockstat.tcp.mem,cat /proc/net/sockstat|grep TCP|cut -d' ' -f 11
14 | UserParameter=sockstat.udp.inuse,cat /proc/net/sockstat|grep UDP:|cut -d' ' -f 3
15 | UserParameter=sockstat.udp.mem,cat /proc/net/sockstat|grep UDP:|cut -d' ' -f 5
16 | UserParameter=check_chmod[*], stat --format '%a' $1
17 | UserParameter=os-full, cat /etc/issue | head -1
18 | UserParameter=swap_enabled, /etc/zabbix/bin/swap_enabled.sh
19 | UserParameter=check_md5sum[*],sudo /usr/bin/md5sum $1 | cut -d' ' -f 1
20 | UserParameter=backup_dir_discovery, /etc/zabbix/bin/backup_dir_discovery.sh
21 | UserParameter=du[*],sudo /usr/bin/du -sb $1 | cut -f 1
22 | UserParameter=root_users, getent passwd | egrep -c ':0+:[0-9]+:'
--------------------------------------------------------------------------------
/bin/blacklist.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # http://giantdorks.org/alain/shell-script-to-query-a-list-of-hostnames-or-ip-addresses-against-a-list-of-local-and-remote-dns-black-lists/
3 | # Modified by Gerard Stanczak gerard@thecamels.org
4 | # Usage: blacklist.sh DOMAIN
5 |
6 | # IPs or hostnames to check if none provided as arguments to the script
7 | hosts='
8 | '
9 |
10 | # Locally maintained list of DNSBLs to check
11 | LocalList='
12 | b.barracudacentral.org
13 | '
14 |
15 | # pipe delimited exclude list for remote lists
16 | Exclude='spamtrap.drbl.drand.net|dnsbl.proxybl.org|^dnsbl.mailer.mobi$|^foo.bar$|^bar.baz$|^.*webiron.*$'
17 |
18 | # Remotely maintained list of DNSBLs to check
19 | WPurl="https://en.wikipedia.org/wiki/Comparison_of_DNS_blacklists"
20 | WPlst=$(curl -s $WPurl | egrep "
([a-z]+\.){1,7}[a-z]+ | " | sed -r "s|?td>||g;/$Exclude/d")
21 |
22 |
23 | # ---------------------------------------------------------------------
24 |
25 | HostToIP()
26 | {
27 | if ( echo "$host" | egrep -q "[a-zA-Z]" ); then
28 | IP=$(host "$host" | awk '/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ {print$NF}')
29 | else
30 | IP="$host"
31 | fi
32 | }
33 |
34 | Reverse()
35 | {
36 | echo $1 | awk -F. '{print$4"."$3"."$2"."$1}'
37 | }
38 |
39 | Check()
40 | {
41 | result=$(dig +short $rIP.$BL)
42 | if [ -n "$result" ]; then
43 | echo -e "$host LISTED $BL (answer = $result)"
44 | else
45 | echo -e "$host OK $BL"
46 | fi
47 | }
48 |
49 | if [ -n "$1" ]; then
50 | hosts=$@
51 | fi
52 |
53 | if [ -z "$hosts" ]; then
54 | hosts=$(netstat -tn | awk '$4 ~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ && $4 !~ /127.0.0/ {gsub(/:[0-9]+/,"",$4);} END{print$4}')
55 | fi
56 |
57 | for host in $hosts; do
58 | HostToIP
59 | rIP=$(Reverse $IP)
60 | # Checking $IP against BLs from $WPurl"
61 | for BL in $WPlst; do
62 | Check
63 | done
64 | # Checking $IP against BLs from a local list"
65 | for BL in $LocalList; do
66 | Check
67 | done
68 | done
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/omreport.conf:
--------------------------------------------------------------------------------
1 | UserParameter=omreport-system,sudo /opt/dell/srvadmin/bin/omreport system -fmt ssv | grep "Main System Chassis" | cut -d ";" -f 1 | grep -c "Ok"
2 | UserParameter=omreport-storage[*],sudo /opt/dell/srvadmin/bin/omreport storage $1 | grep Status | cut -d ":" -f 2 | grep -c Ok
3 | UserParameter=omreport-storage-controller,sudo /opt/dell/srvadmin/bin/omreport storage controller | grep Status | cut -d ":" -f 2 | grep -c -e Ok -e "Non-Critical"
4 | UserParameter=omreport-storage-battery,sudo /opt/dell/srvadmin/bin/omreport storage battery | grep -e Status -e State | cut -d ":" -f 2 | grep -c -e Ok -e Charging
5 | UserParameter=omreport-chassis[*],sudo /opt/dell/srvadmin/bin/omreport chassis -fmt ssv | grep "$1" | cut -d ";" -f 1 | grep -c "Ok"
6 | UserParameter=omreport-chassis-pwrmonitoring,sudo /opt/dell/srvadmin/bin/omreport chassis pwrmonitoring | grep "Status" | cut -d ":" -f 2 | grep -c "Ok"
7 | UserParameter=omreport-chassis-pwrusage,sudo /opt/dell/srvadmin/bin/omreport chassis pwrmonitoring | grep Reading | head -1 | cut -d ":" -f 2 | tr -d " A-Z"
8 | UserParameter=omreport-chassis-hwperformance,sudo /opt/dell/srvadmin/bin/omreport chassis hwperformance | grep "Status" | cut -d ":" -f 2 | grep -c "Normal"
9 | UserParameter=omreport-chassis-firmware,sudo /opt/dell/srvadmin/bin/omreport chassis firmware -fmt ssv | grep DRAC | cut -d ";" -f 2
10 | UserParameter=omreport-chassis-bios,sudo /opt/dell/srvadmin/bin/omreport chassis bios -fmt ssv | grep Version | cut -d ";" -f 2
11 | UserParameter=omreport-storage-pdisk-status, sudo /opt/dell/srvadmin/bin/omreport storage pdisk controller=0 | grep "^Status" | grep -v ": Ok" | wc -l
12 | UserParameter=omreport-storage-pdisk-state, sudo /opt/dell/srvadmin/bin/omreport storage pdisk controller=0 | grep "^State" | grep -v -e ": Online" -e ": Ready" | wc -l
13 | UserParameter=omreport-tag, sudo /opt/dell/srvadmin/bin/omreport system summary | grep 'Chassis Service Tag' | awk -F ': ' '{ print $2}'
14 | UserParameter=omreport-hardware, sudo /opt/dell/srvadmin/bin/omreport system summary | grep 'Chassis Model' | awk -F ': ' '{ print $2}'
--------------------------------------------------------------------------------
/bin/nginx-check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ##################################
3 | # Zabbix monitoring script
4 | #
5 | # nginx:
6 | # - anything available via nginx stub-status module
7 | #
8 | ##################################
9 | # Contact:
10 | # vincent.viallet@gmail.com
11 | ##################################
12 | # ChangeLog:
13 | # 20100922 VV initial creation
14 | ##################################
15 |
16 | # Zabbix requested parameter
17 | ZBX_REQ_DATA="$1"
18 | ZBX_REQ_DATA_URL="$2"
19 |
20 | # Nginx defaults
21 | NGINX_STATUS_DEFAULT_URL="http://localhost:10061/nginx_status"
22 | WGET_BIN="/usr/bin/wget"
23 |
24 | #
25 | # Error handling:
26 | # - need to be displayable in Zabbix (avoid NOT_SUPPORTED)
27 | # - items need to be of type "float" (allow negative + float)
28 | #
29 | ERROR_NO_ACCESS_FILE="-0.9900"
30 | ERROR_NO_ACCESS="-0.9901"
31 | ERROR_WRONG_PARAM="-0.9902"
32 | ERROR_DATA="-0.9903" # either can not connect / bad host / bad port
33 |
34 | # Handle host and port if non-default
35 | if [ ! -z "$ZBX_REQ_DATA_URL" ]; then
36 | URL="$ZBX_REQ_DATA_URL"
37 | else
38 | URL="$NGINX_STATUS_DEFAULT_URL"
39 | fi
40 |
41 | # save the nginx stats in a variable for future parsing
42 | NGINX_STATS=$($WGET_BIN -q $URL -O - 2> /dev/null)
43 |
44 | # error during retrieve
45 | if [ $? -ne 0 -o -z "$NGINX_STATS" ]; then
46 | echo $ERROR_DATA
47 | exit 1
48 | fi
49 |
50 | #
51 | # Extract data from nginx stats
52 | #
53 | case $ZBX_REQ_DATA in
54 | active_connections) echo "$NGINX_STATS" | head -1 | cut -f3 -d' ';;
55 | accepted_connections) echo "$NGINX_STATS" | grep -Ev '[a-zA-Z]' | cut -f2 -d' ';;
56 | handled_connections) echo "$NGINX_STATS" | grep -Ev '[a-zA-Z]' | cut -f3 -d' ';;
57 | handled_requests) echo "$NGINX_STATS" | grep -Ev '[a-zA-Z]' | cut -f4 -d' ';;
58 | reading) echo "$NGINX_STATS" | tail -1 | cut -f2 -d' ';;
59 | writing) echo "$NGINX_STATS" | tail -1 | cut -f4 -d' ';;
60 | waiting) echo "$NGINX_STATS" | tail -1 | cut -f6 -d' ';;
61 | *) echo $ERROR_WRONG_PARAM; exit 1;;
62 | esac
63 |
64 | exit 0
--------------------------------------------------------------------------------
/templates/Template App mdadm.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:35:26Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App mdadm
13 | Template App mdadm
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | -
23 | [RAID] Number of corrupted disk arrays
24 | 0
25 |
26 | 0
27 |
28 | mdstat
29 | 600
30 | 30
31 | 365
32 | 0
33 | 3
34 |
35 |
36 | 0
37 |
38 |
39 | 0
40 | 0
41 |
42 | 0
43 |
44 | 1
45 |
46 |
47 |
48 | 0
49 | 0
50 |
51 |
52 |
53 |
54 |
55 |
56 | 0
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | {Template App mdadm:mdstat.last(0)}>0
71 | RAID is corrupted
72 |
73 | 0
74 | 3
75 |
76 | 0
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/templates/Template App Spamassassin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:44:17Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Spamassassin
13 | Template App Spamassassin
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | -
23 | SpamAssasin service is running
24 | 0
25 |
26 | 0
27 |
28 | proc.num[spamd child]
29 | 90
30 | 7
31 | 365
32 | 0
33 | 3
34 |
35 |
36 | 0
37 |
38 |
39 | 0
40 | 0
41 |
42 | 0
43 |
44 | 1
45 |
46 |
47 |
48 | 0
49 | 0
50 |
51 |
52 |
53 |
54 |
55 |
56 | 0
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | {Template App Spamassassin:proc.num[spamd child].last(0)}=0
71 | Service spamd is not running
72 |
73 | 0
74 | 3
75 |
76 | 0
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/templates/Template App Rserve.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:43:40Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Rserve
13 | Template App Rserve
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Rserve
23 |
24 |
25 |
26 | -
27 | Number of running processes Rserve
28 | 0
29 |
30 | 0
31 |
32 | proc.num[Rserve]
33 | 30
34 | 90
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Rserve
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | {Template App Rserve:proc.num[Rserve].last(0)}<1
79 | Rserve is not running
80 |
81 | 0
82 | 5
83 |
84 | 0
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/templates/Template App Unicorn.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:45:16Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Unicorn
13 | Template App Unicorn
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Unicorn
23 |
24 |
25 |
26 | -
27 | Unicorn is running
28 | 0
29 |
30 | 0
31 |
32 | proc.num[ruby,,,"unicorn"]
33 | 30
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Unicorn
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | {Template App Unicorn:proc.num[ruby,,,"unicorn"].last(0)}=0
79 | Unicorn is down
80 |
81 | 0
82 | 4
83 |
84 | 0
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/templates/Template App Unicorn Rails.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:45:28Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Unicorn Rails
13 | Template App Unicorn Rails
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Unicorn Rails
23 |
24 |
25 |
26 | -
27 | Unicorn Rails is running
28 | 0
29 |
30 | 0
31 |
32 | proc.num[ruby,,,"unicorn_rails"]
33 | 30
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Unicorn Rails
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | {Template App Unicorn Rails:proc.num[ruby,,,"unicorn_rails"].last(0)}=0
79 | Unicorn Rails is down
80 |
81 | 0
82 | 4
83 |
84 | 0
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/templates/Template App SPAM Blacklist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:44:49Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App SPAM Blacklist
13 | Template App SPAM Blacklist
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | blacklist.sh
23 |
24 |
25 |
26 | -
27 | Number of blacklist entries for $1
28 | 0
29 |
30 | 0
31 |
32 | blacklist[{HOST.HOST}]
33 | 3600
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | blacklist.sh
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | {Template App SPAM Blacklist:blacklist[{HOST.HOST}].last()}>0
79 | {HOST.NAME} found on {ITEM.LASTVALUE} blacklist(s)
80 |
81 | 0
82 | 3
83 |
84 | 0
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/bin/apc-check.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/templates/Template App Percona XtraBackup.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:41:40Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Percona XtraBackup
13 | Template App Percona XtraBackup
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | XtraBackup
23 |
24 |
25 |
26 | -
27 | XtraBackup status
28 | 2
29 |
30 | 0
31 |
32 | xtrabackup.status
33 | 0
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | XtraBackup
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | {Template App Percona XtraBackup:xtrabackup.status.last()}=0
79 | XtraBackup has encountered an error
80 |
81 | 0
82 | 3
83 |
84 | 0
85 |
86 |
87 |
88 | {Template App Percona XtraBackup:xtrabackup.status.nodata(86400)}=1
89 | XtraBackup not run for over 24h
90 |
91 | 0
92 | 3
93 |
94 | 0
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/templates/Template SELinux.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:54:02Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template SELinux
13 | Template SELinux
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | SELinux
23 |
24 |
25 |
26 | -
27 | SELinux enabled
28 | 0
29 |
30 | 0
31 |
32 | selinux-enabled
33 | 90
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | SELinux
64 |
65 |
66 |
67 | Service state
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | {Template SELinux:selinux-enabled.last(0)}=0
81 | SELinux is disabled
82 |
83 | 0
84 | 3
85 |
86 | 0
87 |
88 |
89 |
90 |
91 |
92 | Service state
93 |
94 |
95 | 0
96 | Down
97 |
98 |
99 | 1
100 | Up
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/templates/Template App ClamAV.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-08-01T19:35:53Z
5 |
6 |
7 | Templates
8 |
9 |
10 |
11 |
12 | Template App ClamAV
13 | Template App ClamAV
14 |
15 |
16 |
17 | Templates
18 |
19 |
20 |
21 |
22 | ClamAV
23 |
24 |
25 |
26 | -
27 | ClamAV service is running
28 | 0
29 |
30 | 0
31 |
32 | proc.num[clamd]
33 | 90
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | ClamAV
64 |
65 |
66 |
67 | Service state
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | {Template App ClamAV:proc.num[clamd].last(0)}=0
81 | Service clamd (clamav) is not running
82 |
83 | 0
84 | 3
85 |
86 | 0
87 |
88 |
89 |
90 |
91 |
92 | Service state
93 |
94 |
95 | 0
96 | Down
97 |
98 |
99 | 1
100 | Up
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/templates/Template App Solr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:44:04Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Solr
13 | Template App Solr
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Solr
23 |
24 |
25 |
26 | -
27 | Solr service is running
28 | 0
29 |
30 | 0
31 |
32 | net.tcp.service[tcp,,8983]
33 | 60
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Solr
64 |
65 |
66 |
67 | Service state
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | {Template App Solr:net.tcp.service[tcp,,8983].sum(#3)}=0
81 | Solr service is down
82 |
83 | 0
84 | 4
85 |
86 | 0
87 |
88 |
89 |
90 |
91 |
92 | Service state
93 |
94 |
95 | 0
96 | Down
97 |
98 |
99 | 1
100 | Up
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/templates/Template Specific Process Memory Usage.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-10-24T05:01:54Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template Specific Process Memory Used
13 | Template Specific Process Memory Used
14 | custom monitoring for specific process.
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Memory
23 |
24 |
25 |
26 | -
27 | Used memory of $1
28 | 0
29 |
30 | 0
31 |
32 | memory_sum[python]
33 | 60
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 | B
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 | Sum the used memory of python process.
60 | 0
61 |
62 |
63 | Memory
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | Specific Memory Used
79 | 900
80 | 200
81 | 0.0000
82 | 100.0000
83 | 1
84 | 1
85 | 0
86 | 1
87 | 0
88 | 0.0000
89 | 0.0000
90 | 0
91 | 0
92 | 0
93 | 0
94 |
95 |
96 | 0
97 | 0
98 | 1A7C11
99 | 0
100 | 2
101 | 0
102 | -
103 | Template Specific Process Memory Used
104 | memory_sum[python]
105 |
106 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/zabbix_agentd.conf.d/rabbit.conf:
--------------------------------------------------------------------------------
1 | # Add to sudo: zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl
2 |
3 | # Versions
4 | UserParameter=rabbitmq_management,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ Management Console",".*"' | cut -d',' -f2 | tr -d \"
5 | UserParameter=rabbitmq_web_dispatch,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ Web Dispatcher",".*"' | cut -d',' -f2 | tr -d \"
6 | UserParameter=webmachine,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"webmachine",".*"' | cut -d',' -f2 | tr -d \"
7 | UserParameter=mochiweb,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"MochiMedia Web Server",".*"' | cut -d',' -f2 | tr -d \"
8 | UserParameter=web-stomp,/etc/zabbix/bin/rabbitmqctl.sh | grep -A1 '"Rabbit WEB-STOMP - WebSockets to Stomp adapter"' | tail -1 | cut -d'"' -f2
9 | UserParameter=stomp,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"Embedded Rabbit Stomp Adapter",".*"' | cut -d',' -f2 | tr -d \"
10 | UserParameter=rabbitmq_management_agent,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ Management Agent",".*"' | cut -d',' -f2 | tr -d \"
11 | UserParameter=rabbit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ",".*"' | cut -d',' -f2 | tr -d \"
12 | UserParameter=amqp_client,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"RabbitMQ AMQP Client",".*"' | cut -d',' -f2 | tr -d \"
13 | UserParameter=erlang-ssl,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '"Erlang/OTP SSL application",".*"' | cut -d',' -f2 | tr -d \"
14 |
15 | # Memory
16 | UserParameter=memory.total,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'total,[0-9]*' | cut -d',' -f2 | tr -d \"
17 | UserParameter=memory.connection_other,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_other,[0-9]*' | cut -d',' -f2 | tr -d \"
18 | UserParameter=memory.connection_readers,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_readers,[0-9]*' | cut -d',' -f2 | tr -d \"
19 | UserParameter=memory.connection_writers,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_writers,[0-9]*' | cut -d',' -f2 | tr -d \"
20 | UserParameter=memory.connection_channels,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'connection_channels,[0-9]*' | cut -d',' -f2 | tr -d \"
21 | UserParameter=memory.queue_slave_procs,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'queue_slave_procs,[0-9]*' | cut -d',' -f2 | tr -d \"
22 | UserParameter=memory.queue_procs,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'queue_procs,[0-9]*' | cut -d',' -f2 | tr -d \"
23 | UserParameter=memory.plugins,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'plugins,[0-9]*' | cut -d',' -f2 | tr -d \"
24 | UserParameter=memory.other_proc,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'other_proc,[0-9]*' | cut -d',' -f2 | tr -d \"
25 | UserParameter=memory.mnesia,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'mnesia,[0-9]*}' | cut -d',' -f2 | tr -d \"}
26 | UserParameter=memory.mgmt_db,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'mgmt_db,[0-9]*' | cut -d',' -f2 | tr -d \"
27 | UserParameter=memory.msg_index,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'msg_index,[0-9]*' | cut -d',' -f2 | tr -d \"
28 | UserParameter=memory.other_ets,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'other_ets,[0-9]*' | cut -d',' -f2 | tr -d \"
29 | UserParameter=memory.binary,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'binary,[0-9]*' | cut -d',' -f2 | tr -d \"
30 | UserParameter=memory.code,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'code,[0-9]*' | cut -d',' -f2 | tr -d \"
31 | UserParameter=memory.atom,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'atom,[0-9]*' | cut -d',' -f2 | tr -d \"
32 | UserParameter=memory.other_system,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'other_system,[0-9]*' | cut -d',' -f2 | tr -d \"
33 |
34 | UserParameter=vm_memory_high_watermark,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'vm_memory_high_watermark,.*' | cut -d',' -f2 | tr -d \"}
35 | UserParameter=vm_memory_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'vm_memory_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
36 | UserParameter=disk_free_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'disk_free_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
37 | UserParameter=disk_free,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'disk_free,[0-9]*' | cut -d',' -f2 | tr -d \"
38 |
39 | UserParameter=file_descriptors.total_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'total_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
40 | UserParameter=file_descriptors.total_used,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'total_used,[0-9]*' | cut -d',' -f2 | tr -d \"
41 | UserParameter=sockets_limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'sockets_limit,[0-9]*' | cut -d',' -f2 | tr -d \"
42 | UserParameter=sockets_used,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'sockets_used,[0-9]*' | cut -d',' -f2 | tr -d \"
43 |
44 | UserParameter=processes.limit,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '{limit,[0-9]*' | cut -d',' -f2 | tr -d \"
45 | UserParameter=processes.used,/etc/zabbix/bin/rabbitmqctl.sh | grep -o '{used,[0-9]*' | cut -d',' -f2 | tr -d \"
46 |
47 | UserParameter=run_queue,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'run_queue,[0-9]*' | cut -d',' -f2 | tr -d \"
48 | UserParameter=uptime,/etc/zabbix/bin/rabbitmqctl.sh | grep -o 'uptime,[0-9]*' | cut -d',' -f2 | tr -d \"
49 |
50 | #Queues
51 | UserParameter=rabbitmq[*], /etc/zabbix/bin/rabbitmq.sh | grep $1 | cut -d ':' -f2
52 |
53 | #RabbitMQ Status
54 | UserParameter=rabbitmq_status, sudo /usr/sbin/rabbitmqctl status >/dev/null 2>&1; echo $?
--------------------------------------------------------------------------------
/bin/opcache.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/templates/Template App Monit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:35:49Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Monit
13 | Template App Monit
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Monit
23 |
24 |
25 |
26 | -
27 | Monit is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[monit]
33 | 3600
34 | 30
35 | 1
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Monit
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Monit is running
71 | 0
72 |
73 | 0
74 |
75 | proc.num[monit]
76 | 60
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 3
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Monit
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | {Template App Monit:proc.num[monit].last(0)}=0
122 | Monit is down
123 |
124 | 0
125 | 4
126 |
127 | 0
128 |
129 |
130 |
131 | {Template App Monit:chkconfig[monit].last(0)}=0
132 | Monit is not enabled in autostart
133 |
134 | 0
135 | 2
136 |
137 | 0
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/templates/Template App php-fpm.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:42:27Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App php-fpm
13 | Template App php-fpm
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | php-fpm
23 |
24 |
25 |
26 | -
27 | php-fpm is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[php-fpm]
33 | 3600
34 | 30
35 | 1
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | php-fpm
64 |
65 |
66 |
67 |
68 |
69 | -
70 | php-fpm is running
71 | 0
72 |
73 | 0
74 |
75 | proc.num[php-fpm]
76 | 60
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 3
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | php-fpm
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | {Template App php-fpm:chkconfig[php-fpm].last(0)}=0
122 | php-fpm is not enabled in autostart
123 |
124 | 0
125 | 2
126 |
127 | 0
128 |
129 |
130 |
131 | {Template App php-fpm:proc.num[php-fpm].last(0)}=0
132 | php-fpm (port:9000) server is down
133 |
134 | 0
135 | 4
136 |
137 | 0
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/templates/Template App OpenVPN.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:41:26Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App OpenVPN
13 | Template App OpenVPN
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | OpenVPN
23 |
24 |
25 |
26 | -
27 | OpenVPN service is running (full-push)
28 | 0
29 |
30 | 0
31 |
32 | net.tcp.service[tcp,,443]
33 | 90
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | OpenVPN
64 |
65 |
66 |
67 | Service state
68 |
69 |
70 |
71 | -
72 | OpenVPN service is running
73 | 0
74 |
75 | 0
76 |
77 | net.tcp.service[tcp,,1194]
78 | 90
79 | 7
80 | 365
81 | 0
82 | 3
83 |
84 |
85 | 0
86 |
87 |
88 | 0
89 | 0
90 |
91 | 0
92 |
93 | 1
94 |
95 |
96 |
97 | 0
98 | 0
99 |
100 |
101 |
102 |
103 |
104 |
105 | 0
106 |
107 |
108 | OpenVPN
109 |
110 |
111 |
112 | Service state
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | {Template App OpenVPN:net.tcp.service[tcp,,1194].sum(#3)}=0 or {Template App OpenVPN:net.tcp.service[tcp,,443].sum(#3)}=0
126 | OpenVPN service is down
127 |
128 | 0
129 | 3
130 |
131 | 0
132 |
133 |
134 |
135 |
136 |
137 | Service state
138 |
139 |
140 | 0
141 | Down
142 |
143 |
144 | 1
145 | Up
146 |
147 |
148 |
149 |
150 |
151 |
--------------------------------------------------------------------------------
/bin/rabbit.php:
--------------------------------------------------------------------------------
1 | /dev/null');
4 |
5 | $results = array();
6 | $cleanStats = array();
7 | $matches = array();
8 |
9 | $stats = array();
10 | $stats['queues'] = shell_exec(RABBITMQCTL_BIN . ' list_queues name durable auto_delete messages_ready messages_unacknowledged messages consumers memory');
11 | $stats['exchanges'] = shell_exec(RABBITMQCTL_BIN . ' list_exchanges type durable auto_delete');
12 | $stats['bindings'] = shell_exec(RABBITMQCTL_BIN . ' list_bindings source_kind destination_kind');
13 | $stats['connections'] = shell_exec(RABBITMQCTL_BIN . ' list_connections state channels protocol recv_oct send_oct');
14 | $stats['channels'] = shell_exec(RABBITMQCTL_BIN . ' list_channels transactional confirm consumer_count messages_unacknowledged messages_uncommitted acks_uncommitted messages_unconfirmed');
15 |
16 | foreach ($stats as $name => $statusString) {
17 | $statusString = str_replace("\t", " ", $statusString);
18 | $statusString = trim(str_replace("\r", " ", $statusString));
19 | $stats[$name] = preg_replace('/ +/', ' ', $statusString);
20 | $stats[$name] = explode("\n", $statusString);
21 |
22 | foreach ($stats[$name] as $index => $value) {
23 | if (strpos($value, '...') === false && !empty($value)) {
24 | $cleanStats[$name][$index] = $value;
25 | }
26 | }
27 | }
28 |
29 | // QUEUES
30 | if (isset($cleanStats['queues'])) {
31 | foreach ($cleanStats['queues'] as $line) {
32 | $columns = explode(' ', $line);
33 | if (count($columns) == 8) {
34 | $row = array(
35 | 'queues_count' => 1,
36 | 'queues_durable_count' => $columns[1] == 'true' ? 1 : 0,
37 | 'queues_auto_delete_count' => $columns[2] == 'true' ? 1 : 0,
38 | 'messages_ready_count' => $columns[3],
39 | 'messages_unacknowledged_count' => $columns[4],
40 | 'messages_count' => $columns[5],
41 | 'queue_consumers_count' => $columns[6],
42 | 'queues_memory_allocated' => $columns[7],
43 | );
44 | $results[] = $row;
45 | }
46 | }
47 | }
48 | $results[] = array(
49 | 'queues_count' => 0,
50 | 'queues_durable_count' => 0,
51 | 'queues_auto_delete_count' => 0,
52 | 'messages_ready_count' => 0,
53 | 'messages_unacknowledged_count' => 0,
54 | 'messages_count' => 0,
55 | 'queue_consumers_count' => 0,
56 | 'queues_memory_allocated' => 0,
57 | );
58 |
59 |
60 | // EXCHANGES
61 | if (isset($cleanStats['exchanges'])) {
62 | foreach ($cleanStats['exchanges'] as $line) {
63 | $columns = explode(' ', $line);
64 | if (count($columns) == 3) {
65 | $row = array(
66 | 'exchanges_count' => 1,
67 | 'exchanges_durable_count' => $columns[1] == 'true' ? 1 : 0,
68 | 'exchanges_auto_delete_count' => $columns[2] == 'true' ? 1 : 0,
69 | 'exchanges_direct_count' => $columns[0] == 'direct' ? 1 : 0,
70 | 'exchanges_topic_count' => $columns[0] == 'topic' ? 1 : 0,
71 | 'exchanges_fanout_count' => $columns[0] == 'fanout' ? 1 : 0,
72 | 'exchanges_headers_count' => $columns[0] == 'headers' ? 1 : 0,
73 | );
74 | $results[] = $row;
75 | }
76 | }
77 | }
78 | $results[] = array(
79 | 'exchanges_count' => 0,
80 | 'exchanges_durable_count' => 0,
81 | 'exchanges_auto_delete_count' => 0,
82 | 'exchanges_direct_count' => 0,
83 | 'exchanges_topic_count' => 0,
84 | 'exchanges_fanout_count' => 0,
85 | 'exchanges_headers_count' => 0,
86 | );
87 |
88 | // CONNECTIONS
89 | if (isset($cleanStats['connections'])) {
90 | foreach ($cleanStats['connections'] as $line) {
91 | $columns = explode(' ', $line);
92 | if (count($columns) == 5) {
93 | $row = array(
94 | 'connections_count' => 1,
95 | 'connections_starting' => $columns[0] == 'starting' ? 1 : 0,
96 | 'connections_tuning' => $columns[0] == 'tuning' ? 1 : 0,
97 | 'connections_opening' => $columns[0] == 'opening' ? 1 : 0,
98 | 'connections_running' => $columns[0] == 'running' ? 1 : 0,
99 | 'connections_blocking' => $columns[0] == 'blocking' ? 1 : 0,
100 | 'connections_blocked' => $columns[0] == 'blocked' ? 1 : 0,
101 | 'connections_closing' => $columns[0] == 'closing' ? 1 : 0,
102 | 'connections_closed' => $columns[0] == 'closed' ? 1 : 0,
103 | );
104 | $results[] = $row;
105 | }
106 | }
107 | }
108 | $results[] = array(
109 | 'connections_count' => 0,
110 | 'connections_starting' => 0,
111 | 'connections_tuning' => 0,
112 | 'connections_opening' => 0,
113 | 'connections_running' => 0,
114 | 'connections_blocking' => 0,
115 | 'connections_blocked' => 0,
116 | 'connections_closing' => 0,
117 | 'connections_closed' => 0,
118 | );
119 |
120 | // CHANNELS
121 | if (isset($cleanStats['channels'])) {
122 | foreach ($cleanStats['channels'] as $line) {
123 | $columns = explode(' ', $line);
124 | if (count($columns) == 2) {
125 | $row = array(
126 | 'channels_count' => 1,
127 | 'channels_transactional_count' => $columns[0] == 'true' ? 1 : 0,
128 | 'channels_confirm_count' => $columns[1] == 'true' ? 1 : 0,
129 | );
130 | $results[] = $row;
131 | }
132 | }
133 | }
134 | $results[] = array(
135 | 'channels_count' => 0,
136 | 'channels_transactional_count' => 0,
137 | 'channels_confirm_count' => 0,
138 | );
139 |
140 | // BINDINGS
141 | $results[] = array('bindings_count' => count($cleanStats['exchanges']));
142 |
143 | //SUMMARU
144 | $summary = array();
145 | foreach ($results as $index => $values) {
146 | foreach ($values as $name => $value) {
147 | if (!isset($summary[$name])) {
148 | $summary[$name] = 0;
149 | }
150 | $summary[$name] += $value;
151 | }
152 | }
153 |
154 | // PRINT
155 | foreach ($summary as $name => $value) {
156 | echo $name . ':' . $value . "\n";
157 | }
--------------------------------------------------------------------------------
/templates/Template App Amavisd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.2
4 | 2017-06-22T07:42:43Z
5 |
6 |
7 | Templates
8 |
9 |
10 |
11 |
12 | Template App Amavisd
13 | Template App Amavisd
14 |
15 |
16 |
17 | Templates
18 |
19 |
20 |
21 |
22 | Amavisd
23 |
24 |
25 |
26 | -
27 | Amavisd version
28 | 0
29 |
30 | 0
31 |
32 | amavis.version
33 | 3600
34 | 7
35 | 0
36 | 0
37 | 1
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Amavisd
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Amavis service is running
71 | 0
72 |
73 | 0
74 |
75 | proc.num[amavisd]
76 | 90
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Amavisd
107 |
108 |
109 |
110 | Service state
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | {Template App Amavisd:amavis.version.diff(0)}>0
125 | 0
126 |
127 | Amavisd version has changed
128 | 0
129 |
130 |
131 | 0
132 | 1
133 |
134 | 0
135 | 0
136 |
137 |
138 |
139 |
140 | {Template App Amavisd:proc.num[amavisd].last(0)}=0
141 | 0
142 |
143 | Service amavis is not running
144 | 0
145 |
146 |
147 | 0
148 | 3
149 |
150 | 0
151 | 0
152 |
153 |
154 |
155 |
156 |
157 |
158 | Service state
159 |
160 |
161 | 0
162 | Down
163 |
164 |
165 | 1
166 | Up
167 |
168 |
169 |
170 |
171 |
172 |
--------------------------------------------------------------------------------
/templates/Template Device SNMP Generic.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.0
4 | 2014-08-04T13:36:20Z
5 |
6 |
7 | Templates
8 |
9 |
10 |
11 |
12 | Template Device SNMP Generic
13 | Template Device SNMP Generic
14 |
15 |
16 | Templates
17 |
18 |
19 |
20 |
21 | -
22 | ICMP loss
23 | 3
24 |
25 | 0
26 |
27 | icmppingloss
28 | 60
29 | 30
30 | 365
31 | 0
32 | 0
33 |
34 | %
35 | 0
36 |
37 |
38 | 0
39 | 0
40 |
41 | 0
42 |
43 | 1
44 |
45 |
46 |
47 | 0
48 | 0
49 |
50 |
51 |
52 |
53 |
54 |
55 | 0
56 |
57 |
58 |
59 | -
60 | ICMP Ping
61 | 3
62 |
63 | 0
64 |
65 | icmpping
66 | 30
67 | 30
68 | 365
69 | 0
70 | 3
71 |
72 |
73 | 0
74 |
75 |
76 | 0
77 | 0
78 |
79 | 0
80 |
81 | 1
82 |
83 |
84 |
85 | 0
86 | 0
87 |
88 |
89 |
90 |
91 |
92 |
93 | 0
94 |
95 |
96 |
97 | -
98 | ICMP response time
99 | 3
100 |
101 | 0
102 |
103 | icmppingsec
104 | 60
105 | 30
106 | 365
107 | 0
108 | 0
109 |
110 | s
111 | 0
112 |
113 |
114 | 0
115 | 0
116 |
117 | 0
118 |
119 | 1
120 |
121 |
122 |
123 | 0
124 | 0
125 |
126 |
127 |
128 |
129 |
130 |
131 | 0
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | {Template Device SNMP Generic:icmppingloss.min(5m)}>20
145 | Ping loss is too high
146 |
147 | 0
148 | 3
149 | Packet loss more than 20% on {HOST.IP}
150 | 0
151 |
152 |
153 | {HOST.NAME} is unavailable by ICMP
154 | {Template Device SNMP Generic:icmpping.max(180)}=0
155 |
156 |
157 |
158 |
159 | {Template Device SNMP Generic:icmppingsec.avg(10m)}>0.20
160 | Response time is too high
161 |
162 | 0
163 | 2
164 | Response time more than 200ms for 10 minutes.
165 | 0
166 |
167 |
168 | {HOST.NAME} is unavailable by ICMP
169 | {Template Device SNMP Generic:icmpping.max(180)}=0
170 |
171 |
172 |
173 |
174 | {Template Device SNMP Generic:icmpping.max(180)}=0
175 | {HOST.NAME} is unavailable by ICMP
176 |
177 | 0
178 | 5
179 | {HOST.IP} not responding to ICMP in 3 minutes
180 | 0
181 |
182 |
183 |
184 |
185 |
--------------------------------------------------------------------------------
/templates/Template App PHP.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:41:53Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App PHP
13 | Template App PHP
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | PHP
23 |
24 |
25 |
26 | -
27 | PHP version
28 | 0
29 |
30 | 0
31 |
32 | php.version
33 | 3600
34 | 30
35 | 0
36 | 0
37 | 1
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | PHP
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Checksum of $1
71 | 0
72 |
73 | 0
74 |
75 | vfs.file.cksum[/etc/php.ini]
76 | 600
77 | 7
78 | 30
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | PHP
107 |
108 |
109 |
110 |
111 |
112 | -
113 | File exists: $1
114 | 0
115 |
116 | 0
117 |
118 | vfs.file.exists[/etc/php.ini]
119 | 600
120 | 7
121 | 30
122 | 0
123 | 3
124 |
125 |
126 | 0
127 |
128 |
129 | 0
130 | 0
131 |
132 | 0
133 |
134 | 1
135 |
136 |
137 |
138 | 0
139 | 0
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 |
148 |
149 | PHP
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 | {Template App PHP:vfs.file.exists[/etc/php.ini].last()}=0
165 | /etc/php.ini does not exist (missing file)
166 |
167 | 0
168 | 4
169 |
170 | 0
171 |
172 |
173 |
174 | {Template App PHP:vfs.file.cksum[/etc/php.ini].diff(0)}>0
175 | /etc/php.ini has been changed
176 |
177 | 0
178 | 1
179 |
180 | 0
181 |
182 |
183 |
184 | {Template App PHP:php.version.diff(0)}>0
185 | PHP version has changed
186 |
187 | 0
188 | 1
189 |
190 | 0
191 |
192 |
193 |
194 |
195 |
--------------------------------------------------------------------------------
/templates/Template App OpenDKIM.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:38:04Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App OpenDKIM
13 | Template App OpenDKIM
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | OpenDKIM
23 |
24 |
25 |
26 | -
27 | OpenDKIM is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[opendkim]
33 | 3600
34 | 7
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | OpenDKIM
64 |
65 |
66 |
67 |
68 |
69 | -
70 | OpenDKIM version
71 | 0
72 |
73 | 0
74 |
75 | opendkim.version
76 | 3600
77 | 30
78 | 0
79 | 0
80 | 1
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | OpenDKIM
107 |
108 |
109 |
110 |
111 |
112 | -
113 | OpenDKIM service is running
114 | 0
115 |
116 | 0
117 |
118 | proc.num[opendkim]
119 | 60
120 | 30
121 | 365
122 | 0
123 | 3
124 |
125 |
126 | 0
127 |
128 |
129 | 0
130 | 0
131 |
132 | 0
133 |
134 | 1
135 |
136 |
137 |
138 | 0
139 | 0
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 |
148 |
149 | OpenDKIM
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 | {Template App OpenDKIM:chkconfig[opendkim].last(0)}=0
165 | OpenDKIM is not enabled in autostart
166 |
167 | 0
168 | 2
169 |
170 | 0
171 |
172 |
173 |
174 | {Template App OpenDKIM:proc.num[opendkim].last(0)}=0
175 | OpenDKIM service is down
176 |
177 | 0
178 | 3
179 |
180 | 0
181 |
182 |
183 |
184 | {Template App OpenDKIM:opendkim.version.diff(0)}>0
185 | OpenDKIM version has changed
186 |
187 | 0
188 | 1
189 |
190 | 0
191 |
192 |
193 |
194 |
195 |
--------------------------------------------------------------------------------
/templates/Template App Etherpad.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:31:01Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Etherpad
13 | Template App Etherpad
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Etherpad
23 |
24 |
25 |
26 | -
27 | Etherpad is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[etherpad]
33 | 3600
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Etherpad
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Etherpad service is listening
71 | 0
72 |
73 | 0
74 |
75 | net.tcp.service[tcp,,10000]
76 | 60
77 | 7
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Etherpad
107 |
108 |
109 |
110 | Service state
111 |
112 |
113 |
114 | -
115 | Etherpad is running
116 | 0
117 |
118 | 0
119 |
120 | proc.num[node]
121 | 60
122 | 7
123 | 365
124 | 0
125 | 3
126 |
127 |
128 | 0
129 |
130 |
131 | 0
132 | 0
133 |
134 | 0
135 |
136 | 1
137 |
138 |
139 |
140 | 0
141 | 0
142 |
143 |
144 |
145 |
146 |
147 |
148 | 0
149 |
150 |
151 | Etherpad
152 |
153 |
154 |
155 | Service state
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | {Template App Etherpad:chkconfig[etherpad].last(0)}=0
169 | Etherpad is not enabled in autostart
170 |
171 | 0
172 | 2
173 |
174 | 0
175 |
176 |
177 |
178 | {Template App Etherpad:proc.num[node].last(0)}=0 or {Template App Etherpad:net.tcp.service[tcp,,10000].last(0)}=0
179 | Etherpad is not running
180 |
181 | 0
182 | 3
183 |
184 | 0
185 |
186 |
187 |
188 |
189 |
190 | Service state
191 |
192 |
193 | 0
194 | Down
195 |
196 |
197 | 1
198 | Up
199 |
200 |
201 |
202 |
203 |
204 |
--------------------------------------------------------------------------------
/templates/Template App vsftpd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:45:41Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App vsftpd
13 | Template App vsftpd
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | vsftpd
23 |
24 |
25 |
26 | -
27 | vsftpd is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[vsftpd]
33 | 3600
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | vsftpd
64 |
65 |
66 |
67 |
68 |
69 | -
70 | vsftpd server is listening
71 | 0
72 |
73 | 0
74 |
75 | net.tcp.service[ftp]
76 | 60
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | vsftpd
107 |
108 |
109 |
110 | Service state
111 |
112 |
113 |
114 | -
115 | vsftpd is running
116 | 0
117 |
118 | 0
119 |
120 | proc.num[vsftpd]
121 | 60
122 | 30
123 | 365
124 | 0
125 | 3
126 |
127 |
128 | 0
129 |
130 |
131 | 0
132 | 0
133 |
134 | 0
135 |
136 | 1
137 |
138 |
139 |
140 | 0
141 | 0
142 |
143 |
144 |
145 |
146 |
147 |
148 | 0
149 |
150 |
151 | vsftpd
152 |
153 |
154 |
155 | Service state
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | {Template App vsftpd:proc.num[vsftpd].last(0)}=0
169 | vsftpd is down
170 |
171 | 0
172 | 3
173 |
174 | 0
175 |
176 |
177 |
178 | {Template App vsftpd:chkconfig[vsftpd].last(0)}=0
179 | vsftpd is not enabled in autostart
180 |
181 | 0
182 | 2
183 |
184 | 0
185 |
186 |
187 |
188 | {Template App vsftpd:net.tcp.service[ftp].last(0)}=0
189 | vsftpd server is down
190 |
191 | 0
192 | 3
193 |
194 | 0
195 |
196 |
197 |
198 |
199 |
200 | Service state
201 |
202 |
203 | 0
204 | Down
205 |
206 |
207 | 1
208 | Up
209 |
210 |
211 |
212 |
213 |
214 |
--------------------------------------------------------------------------------
/templates/Template App Pure-FTPd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:43:15Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Pure-FTPd
13 | Template App Pure-FTPd
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Pure-FTPd
23 |
24 |
25 |
26 | -
27 | Pure-FTPd is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[pure-ftpd]
33 | 3600
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Pure-FTPd
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Pure-FTPd server is listening
71 | 0
72 |
73 | 0
74 |
75 | net.tcp.service[ftp]
76 | 60
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Pure-FTPd
107 |
108 |
109 |
110 | Service state
111 |
112 |
113 |
114 | -
115 | Pure-FTPd is running
116 | 0
117 |
118 | 0
119 |
120 | proc.num[pure-ftpd]
121 | 60
122 | 30
123 | 365
124 | 0
125 | 3
126 |
127 |
128 | 0
129 |
130 |
131 | 0
132 | 0
133 |
134 | 0
135 |
136 | 1
137 |
138 |
139 |
140 | 0
141 | 0
142 |
143 |
144 |
145 |
146 |
147 |
148 | 0
149 |
150 |
151 | Pure-FTPd
152 |
153 |
154 |
155 | Service state
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 | {Template App Pure-FTPd:proc.num[pure-ftpd].last(0)}=0
169 | pure-ftpd is down
170 |
171 | 0
172 | 3
173 |
174 | 0
175 |
176 |
177 |
178 | {Template App Pure-FTPd:chkconfig[pure-ftpd].last(0)}=0
179 | pure-ftpd is not enabled in autostart
180 |
181 | 0
182 | 2
183 |
184 | 0
185 |
186 |
187 |
188 | {Template App Pure-FTPd:net.tcp.service[ftp].last(0)}=0
189 | pure-ftpd server is down
190 |
191 | 0
192 | 3
193 |
194 | 0
195 |
196 |
197 |
198 |
199 |
200 | Service state
201 |
202 |
203 | 0
204 | Down
205 |
206 |
207 | 1
208 | Up
209 |
210 |
211 |
212 |
213 |
214 |
--------------------------------------------------------------------------------
/templates/Template App BIND.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:03:15Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App BIND
13 | Template App BIND
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | BIND
23 |
24 |
25 |
26 | -
27 | BIND version
28 | 0
29 |
30 | 0
31 |
32 | bind.version
33 | 3600
34 | 30
35 | 0
36 | 0
37 | 1
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | BIND
64 |
65 |
66 |
67 |
68 |
69 | -
70 | BIND is enabled in autostart
71 | 0
72 |
73 | 0
74 |
75 | chkconfig[named]
76 | 3600
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 3
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | BIND
107 |
108 |
109 |
110 |
111 |
112 | -
113 | BIND server is listening
114 | 0
115 |
116 | 0
117 |
118 | net.tcp.service[tcp,,53]
119 | 60
120 | 30
121 | 365
122 | 0
123 | 3
124 |
125 |
126 | 0
127 |
128 |
129 | 0
130 | 0
131 |
132 | 0
133 |
134 | 1
135 |
136 |
137 |
138 | 0
139 | 0
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 |
148 |
149 | BIND
150 |
151 |
152 |
153 | Service state
154 |
155 |
156 |
157 | -
158 | BIND is running
159 | 0
160 |
161 | 0
162 |
163 | proc.num[named]
164 | 60
165 | 30
166 | 365
167 | 0
168 | 3
169 |
170 |
171 | 0
172 |
173 |
174 | 0
175 | 0
176 |
177 | 0
178 |
179 | 1
180 |
181 |
182 |
183 | 0
184 | 0
185 |
186 |
187 |
188 |
189 |
190 |
191 | 0
192 |
193 |
194 | BIND
195 |
196 |
197 |
198 | Service state
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 | {Template App BIND:proc.num[named].last(0)}=0
212 | BIND is down
213 |
214 | 0
215 | 4
216 |
217 | 0
218 |
219 |
220 |
221 | {Template App BIND:chkconfig[named].last(0)}=0
222 | BIND is not enabled in autostart
223 |
224 | 0
225 | 2
226 |
227 | 0
228 |
229 |
230 |
231 | {Template App BIND:net.tcp.service[tcp,,53].last(0)}=0
232 | BIND server is down
233 |
234 | 0
235 | 4
236 |
237 | 0
238 |
239 |
240 |
241 | {Template App BIND:bind.version.diff(0)}>0
242 | BIND version has changed
243 |
244 | 0
245 | 1
246 |
247 | 0
248 |
249 |
250 |
251 |
252 |
253 | Service state
254 |
255 |
256 | 0
257 | Down
258 |
259 |
260 | 1
261 | Up
262 |
263 |
264 |
265 |
266 |
267 |
--------------------------------------------------------------------------------
/templates/Template App Dovecot.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:30:35Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Dovecot
13 | Template App Dovecot
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Dovecot
23 |
24 |
25 |
26 | -
27 | Dovecot is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[dovecot]
33 | 3600
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Dovecot
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Dovecot version
71 | 0
72 |
73 | 0
74 |
75 | dovecot.version
76 | 3600
77 | 30
78 | 0
79 | 0
80 | 1
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Dovecot
107 |
108 |
109 |
110 |
111 |
112 | -
113 | IMAP server is running
114 | 0
115 |
116 | 0
117 |
118 | net.tcp.service[imap]
119 | 30
120 | 30
121 | 365
122 | 0
123 | 3
124 |
125 |
126 | 0
127 |
128 |
129 | 0
130 | 0
131 |
132 | 0
133 |
134 | 0
135 |
136 |
137 |
138 | 0
139 | 0
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 |
148 |
149 | Dovecot
150 |
151 |
152 |
153 | Service state
154 |
155 |
156 |
157 | -
158 | POP3 server is running
159 | 0
160 |
161 | 0
162 |
163 | net.tcp.service[pop]
164 | 30
165 | 30
166 | 365
167 | 1
168 | 3
169 |
170 |
171 | 0
172 |
173 |
174 | 0
175 | 0
176 |
177 | 0
178 |
179 | 0
180 |
181 |
182 |
183 | 0
184 | 0
185 |
186 |
187 |
188 |
189 |
190 |
191 | 0
192 |
193 |
194 | Dovecot
195 |
196 |
197 |
198 | Service state
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 | {Template App Dovecot:chkconfig[dovecot].last(0)}=0
212 | Dovecot is not enabled in autostart
213 |
214 | 0
215 | 2
216 |
217 | 0
218 |
219 |
220 |
221 | {Template App Dovecot:dovecot.version.diff(0)}>0
222 | Dovecot version has changed
223 |
224 | 0
225 | 1
226 |
227 | 0
228 |
229 |
230 |
231 | {Template App Dovecot:net.tcp.service[imap].last(0)}=0
232 | IMAP server is down
233 |
234 | 0
235 | 4
236 |
237 | 0
238 |
239 |
240 |
241 | {Template App Dovecot:net.tcp.service[pop].last(0)}=0
242 | POP3 server is down
243 |
244 | 1
245 | 4
246 |
247 | 0
248 |
249 |
250 |
251 |
252 |
253 | Service state
254 |
255 |
256 | 0
257 | Down
258 |
259 |
260 | 1
261 | Up
262 |
263 |
264 |
265 |
266 |
267 |
--------------------------------------------------------------------------------
/templates/Template App Wowza.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.4
4 | 2017-09-14T08:09:02Z
5 |
6 |
7 | Templates
8 |
9 |
10 |
11 |
12 | Template App Wowza
13 | Template App Wowza
14 |
15 |
16 |
17 | Templates
18 |
19 |
20 |
21 |
22 | Wowza
23 |
24 |
25 |
26 | -
27 | Wowza Streaming Engine Manager is enabled in autostart
28 | 0
29 |
30 |
31 | chkconfig[WowzaStreamingEngineManager]
32 | 1h
33 | 1w
34 | 365d
35 | 0
36 | 3
37 |
38 |
39 |
40 |
41 | 0
42 | 0
43 |
44 | 0
45 |
46 |
47 |
48 | 0
49 |
50 |
51 |
52 |
53 |
54 |
55 | 0
56 |
57 |
58 | Wowza
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | -
68 | Wowza Streaming Engine is enabled in autostart
69 | 0
70 |
71 |
72 | chkconfig[WowzaStreamingEngine]
73 | 1h
74 | 1w
75 | 365d
76 | 0
77 | 3
78 |
79 |
80 |
81 |
82 | 0
83 | 0
84 |
85 | 0
86 |
87 |
88 |
89 | 0
90 |
91 |
92 |
93 |
94 |
95 |
96 | 0
97 |
98 |
99 | Wowza
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | -
109 | Wowza Streaming Engine is running
110 | 0
111 |
112 |
113 | net.tcp.service[tcp,,1935]
114 | 90s
115 | 30d
116 | 365d
117 | 0
118 | 3
119 |
120 |
121 |
122 |
123 | 0
124 | 0
125 |
126 | 0
127 |
128 |
129 |
130 | 0
131 |
132 |
133 |
134 |
135 |
136 |
137 | 0
138 |
139 |
140 | Wowza
141 |
142 |
143 |
144 | Service state
145 |
146 |
147 |
148 |
149 |
150 |
151 | -
152 | Wowza Streaming Engine Manager is running
153 | 0
154 |
155 |
156 | net.tcp.service[tcp,,8088]
157 | 90s
158 | 30d
159 | 365d
160 | 0
161 | 3
162 |
163 |
164 |
165 |
166 | 0
167 | 0
168 |
169 | 0
170 |
171 |
172 |
173 | 0
174 |
175 |
176 |
177 |
178 |
179 |
180 | 0
181 |
182 |
183 | Wowza
184 |
185 |
186 |
187 | Service state
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 | {Template App Wowza:chkconfig[WowzaStreamingEngine].last(0)}=0
205 | 0
206 |
207 | Wowza Streaming Engine is not enabled in autostart
208 | 0
209 |
210 |
211 | 0
212 | 3
213 |
214 | 0
215 | 0
216 |
217 |
218 |
219 |
220 | {Template App Wowza:net.tcp.service[tcp,,1935].last(0)}=0
221 | 0
222 |
223 | Wowza Streaming Engine is running
224 | 0
225 |
226 |
227 | 0
228 | 4
229 |
230 | 0
231 | 0
232 |
233 |
234 |
235 |
236 | {Template App Wowza:chkconfig[WowzaStreamingEngineManager].last(0)}=0
237 | 0
238 |
239 | Wowza Streaming Engine Manager is not enabled in autostart
240 | 0
241 |
242 |
243 | 0
244 | 3
245 |
246 | 0
247 | 0
248 |
249 |
250 |
251 |
252 | {Template App Wowza:net.tcp.service[tcp,,8088].last(0)}=0
253 | 0
254 |
255 | Wowza Streaming Engine Manager is running
256 | 0
257 |
258 |
259 | 0
260 | 4
261 |
262 | 0
263 | 0
264 |
265 |
266 |
267 |
268 |
269 |
270 | Service state
271 |
272 |
273 | 0
274 | Down
275 |
276 |
277 | 1
278 | Up
279 |
280 |
281 |
282 |
283 |
284 |
--------------------------------------------------------------------------------
/templates/Template App Fail2Ban.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.2
4 | 2016-11-03T10:34:31Z
5 |
6 |
7 | Templates
8 |
9 |
10 |
11 |
12 | Template App Fail2Ban
13 | Template App Fail2Ban
14 |
15 |
16 |
17 | Templates
18 |
19 |
20 |
21 |
22 | Fail2Ban
23 |
24 |
25 |
26 | -
27 | Fail2ban is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[fail2ban]
33 | 1800
34 | 30
35 | 365
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Fail2Ban
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Temporary banned IP
71 | 0
72 |
73 | 0
74 |
75 | fail2ban[banned]
76 | 300
77 | 30
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Fail2Ban
107 |
108 |
109 |
110 |
111 |
112 | -
113 | Permanent banned IP
114 | 0
115 |
116 | 0
117 |
118 | fail2ban[permanent]
119 | 300
120 | 30
121 | 365
122 | 0
123 | 3
124 |
125 |
126 | 0
127 |
128 |
129 | 0
130 | 0
131 |
132 | 0
133 |
134 | 1
135 |
136 |
137 |
138 | 0
139 | 0
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 |
148 |
149 | Fail2Ban
150 |
151 |
152 |
153 |
154 |
155 | -
156 | Fail2Ban service is running
157 | 0
158 |
159 | 0
160 |
161 | proc.num[fail2ban-server]
162 | 60
163 | 30
164 | 365
165 | 0
166 | 3
167 |
168 |
169 | 0
170 |
171 |
172 | 0
173 | 0
174 |
175 | 0
176 |
177 | 1
178 |
179 |
180 |
181 | 0
182 | 0
183 |
184 |
185 |
186 |
187 |
188 |
189 | 0
190 |
191 |
192 | Fail2Ban
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 | {Template App Fail2Ban:chkconfig[fail2ban].last(0)}=0
209 | 0
210 |
211 | Fail2ban is not enabled in autostart
212 | 0
213 |
214 |
215 | 0
216 | 2
217 |
218 | 0
219 | 0
220 |
221 |
222 |
223 |
224 | {Template App Fail2Ban:proc.num[fail2ban-server].sum(#3)}=0
225 | 0
226 |
227 | Fail2Ban service is down
228 | 0
229 |
230 |
231 | 0
232 | 3
233 |
234 | 0
235 | 0
236 |
237 |
238 |
239 |
240 |
241 |
242 | Fail2Ban banned IP
243 | 900
244 | 200
245 | 0.0000
246 | 100.0000
247 | 1
248 | 1
249 | 0
250 | 1
251 | 0
252 | 0.0000
253 | 0.0000
254 | 0
255 | 0
256 | 0
257 | 0
258 |
259 |
260 | 0
261 | 0
262 | 1A7C11
263 | 0
264 | 2
265 | 0
266 | -
267 | Template App Fail2Ban
268 | fail2ban[banned]
269 |
270 |
271 |
272 | 1
273 | 0
274 | F63100
275 | 0
276 | 2
277 | 0
278 | -
279 | Template App Fail2Ban
280 | fail2ban[permanent]
281 |
282 |
283 |
284 |
285 |
286 |
287 |
--------------------------------------------------------------------------------
/templates/Template App Zabbix Agent - Debian.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.2
4 | 2017-02-16T18:11:47Z
5 |
6 |
7 | Templates
8 |
9 |
10 |
11 |
12 | Template App Zabbix Agent - Debian
13 | Template App Zabbix Agent - Debian
14 |
15 |
16 |
17 | Templates
18 |
19 |
20 |
21 |
22 | Zabbix agent
23 |
24 |
25 |
26 | -
27 | Host name of zabbix_agentd running
28 | 0
29 |
30 | 0
31 |
32 | agent.hostname
33 | 3600
34 | 7
35 | 0
36 | 0
37 | 1
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 0
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Zabbix agent
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Agent ping
71 | 0
72 |
73 | 0
74 |
75 | agent.ping
76 | 90
77 | 7
78 | 365
79 | 0
80 | 3
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 | The agent always returns 1 for this item. It could be used in combination with nodata() for availability check.
103 | 0
104 |
105 |
106 | Zabbix agent
107 |
108 |
109 |
110 | Zabbix agent ping status
111 |
112 |
113 |
114 | -
115 | Version of zabbix_agent(d) running
116 | 0
117 |
118 | 0
119 |
120 | agent.version
121 | 3600
122 | 7
123 | 0
124 | 0
125 | 1
126 |
127 |
128 | 0
129 |
130 |
131 | 0
132 | 0
133 |
134 | 0
135 |
136 | 1
137 |
138 |
139 |
140 | 0
141 | 0
142 |
143 |
144 |
145 |
146 |
147 |
148 | 0
149 |
150 |
151 | Zabbix agent
152 |
153 |
154 |
155 |
156 |
157 | -
158 | Zabbix Agent is enabled in autostart
159 | 0
160 |
161 | 0
162 |
163 | chkconfig[zabbix-agent]
164 | 3600
165 | 7
166 | 365
167 | 0
168 | 3
169 |
170 |
171 | 0
172 |
173 |
174 | 0
175 | 0
176 |
177 | 0
178 |
179 | 1
180 |
181 |
182 |
183 | 3
184 | 0
185 |
186 |
187 |
188 |
189 |
190 |
191 | 0
192 |
193 |
194 | Zabbix agent
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 | {Template App Zabbix Agent - Debian:agent.hostname.diff(0)}>0
211 | 0
212 |
213 | Host name of zabbix_agentd was changed
214 | 0
215 |
216 |
217 | 0
218 | 1
219 |
220 | 0
221 | 0
222 |
223 |
224 |
225 |
226 | {Template App Zabbix Agent - Debian:agent.version.diff(0)}>0
227 | 0
228 |
229 | Version of zabbix_agent(d) was changed
230 | 0
231 |
232 |
233 | 0
234 | 1
235 |
236 | 0
237 | 0
238 |
239 |
240 |
241 |
242 | {Template App Zabbix Agent - Debian:chkconfig[zabbix-agent].last(0)}=0
243 | 0
244 |
245 | Zabbix Agent is not enabled in autostart
246 | 0
247 |
248 |
249 | 0
250 | 2
251 |
252 | 0
253 | 0
254 |
255 |
256 |
257 |
258 | {Template App Zabbix Agent - Debian:agent.ping.nodata(4m)}=1
259 | 0
260 |
261 | Zabbix agent is unreachable
262 | 0
263 |
264 |
265 | 0
266 | 5
267 |
268 | 0
269 | 0
270 |
271 |
272 |
273 |
274 |
275 |
276 | Zabbix agent ping status
277 |
278 |
279 | 1
280 | Up
281 |
282 |
283 |
284 |
285 |
286 |
--------------------------------------------------------------------------------
/templates/Template App Exim.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0
4 | 2016-05-02T08:34:46Z
5 |
6 |
7 | Zabbix Templates
8 |
9 |
10 |
11 |
12 | Template App Exim
13 | Template App Exim
14 |
15 |
16 |
17 | Zabbix Templates
18 |
19 |
20 |
21 |
22 | Exim
23 |
24 |
25 |
26 | -
27 | Exim is enabled in autostart
28 | 0
29 |
30 | 0
31 |
32 | chkconfig[exim]
33 | 1800
34 | 7
35 | 30
36 | 0
37 | 3
38 |
39 |
40 | 0
41 |
42 |
43 | 0
44 | 0
45 |
46 | 0
47 |
48 | 1
49 |
50 |
51 |
52 | 3
53 | 0
54 |
55 |
56 |
57 |
58 |
59 |
60 | 0
61 |
62 |
63 | Exim
64 |
65 |
66 |
67 |
68 |
69 | -
70 | Exim version
71 | 0
72 |
73 | 0
74 |
75 | exim.version
76 | 3600
77 | 30
78 | 0
79 | 0
80 | 1
81 |
82 |
83 | 0
84 |
85 |
86 | 0
87 | 0
88 |
89 | 0
90 |
91 | 1
92 |
93 |
94 |
95 | 0
96 | 0
97 |
98 |
99 |
100 |
101 |
102 |
103 | 0
104 |
105 |
106 | Exim
107 |
108 |
109 |
110 |
111 |
112 | -
113 | Number of mails in queue
114 | 0
115 |
116 | 0
117 |
118 | mailqueue-exim
119 | 60
120 | 30
121 | 365
122 | 0
123 | 3
124 |
125 |
126 | 0
127 |
128 |
129 | 0
130 | 0
131 |
132 | 0
133 |
134 | 1
135 |
136 |
137 |
138 | 0
139 | 0
140 |
141 |
142 |
143 |
144 |
145 |
146 | 0
147 |
148 |
149 | Exim
150 |
151 |
152 |
153 |
154 |
155 | -
156 | SMTP service is running
157 | 0
158 |
159 | 0
160 |
161 | net.tcp.service[smtp]
162 | 90
163 | 7
164 | 365
165 | 0
166 | 3
167 |
168 |
169 | 0
170 |
171 |
172 | 0
173 | 0
174 |
175 | 0
176 |
177 | 1
178 |
179 |
180 |
181 | 0
182 | 0
183 |
184 |
185 |
186 |
187 |
188 |
189 | 0
190 |
191 |
192 | Exim
193 |
194 |
195 |
196 | Service state
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 | {Template App Exim:chkconfig[exim].last(0)}=0
210 | Exim is not enabled in autostart
211 |
212 | 0
213 | 2
214 |
215 | 0
216 |
217 |
218 |
219 | {Template App Exim:exim.version.diff(0)}>0
220 | Exim version has changed
221 |
222 | 0
223 | 1
224 |
225 | 0
226 |
227 |
228 |
229 | {Template App Exim:mailqueue-exim.min(3600)}>500
230 | High mail queue ({ITEM.LASTVALUE} mails)
231 |
232 | 0
233 | 3
234 |
235 | 0
236 |
237 |
238 |
239 | {Template App Exim:mailqueue-exim.min(21600)}>50
240 | High old mail queue ({ITEM.LASTVALUE} mails)
241 |
242 | 0
243 | 2
244 |
245 | 0
246 |
247 |
248 |
249 | {Template App Exim:net.tcp.service[smtp].last(0)}=0
250 | SMTP server is down
251 |
252 | 0
253 | 4
254 |
255 | 0
256 |
257 |
258 |
259 |
260 |
261 | Mail queue
262 | 900
263 | 200
264 | 0.0000
265 | 100.0000
266 | 1
267 | 0
268 | 0
269 | 0
270 | 0
271 | 0.0000
272 | 0.0000
273 | 1
274 | 0
275 | 0
276 | 0
277 |
278 |
279 | 0
280 | 5
281 | C80000
282 | 0
283 | 2
284 | 0
285 | -
286 | Template App Exim
287 | mailqueue-exim
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 | Service state
296 |
297 |
298 | 0
299 | Down
300 |
301 |
302 | 1
303 | Up
304 |
305 |
306 |
307 |
308 |
309 |
--------------------------------------------------------------------------------