mysql 多实例监控,epmmm zabbix mysql 多实例 监控 模版

epmmm performance monitor for mysql and mariadb on zabbix 2.x and zabbix 3.x

link:

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值