epmmm zabbix mysql 多執行個體 監控 模版

來源:互聯網
上載者:User

標籤:username   win   mac   OWIN   port   moni   cep   lib   ibm   

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 10 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 port, 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

you may be 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 has 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 多執行個體 監控 模版

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.