Epmmm Performance Monitor for MySQL and mariadb on Zabbix 2.x and Zabbix 3.x
Link
Https://github.com/earl86/epmmm
The wrapper for Zabbix python script.
It runs the script every seconds. and parses the cache file on each following run.
Test the script using:
Zabbix_get-s 192.168.0.1-p 10050-k "Epmmm.mysql.check[zabbixmysql,192.168.0.1,3306,check]"
Python epmmm_get_mysql_stats.py--servicehostname servicehostname--servicehost ServiceHost--serviceport serviceport --username username--password Password
The script need zabbix_sender and Python Running environment
The default monitor MySQL port is 3306, if you need to monitor other ports, you need to add the inherited and host macros:{ $MYSQL _port}=xxxx on the monitor Host
Remember to change the USERNAME PASSWORD zabbixserver for your ' s.
Authors:earl86
Info:the scripts only tested on Python 2.6 and Python 2.7. It not tested on Python 3
Using
Install Python and Pip
Pip Install Mysql-python
Pip Install Argparse
Need to link file:
Ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib64/libmysqlclient.so.18
Import the template into Zabbix
Put the following three scripts on Zhe MySQL server which have Zabbix agent
/etc/zabbix/zabbix_agentd.d/userparameter_epmmm_mysql.conf
/etc/zabbix/scripts/epmmm_get_mysql_stats_wrapper.sh
/etc/zabbix/scripts/epmmm_get_mysql_stats.py
Restart the Zabbix Agent service
Add the Mysqlservice and mysqlhost on Zabbix web
Enjoy it
Epmmm Zabbix MySQL Multi-instance monitor template