Epmmm Zabbix MySQL Multi-instance monitor template

Source: Internet
Author: User
Tags python script

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.