Zabbix-2.4.8-1 adding MySQL master-slave status monitoring

Source: Internet
Author: User

1, installation Zabbix-agent
Yum-y Install zabbix-2.4.8-1.el6.x86_64.rpm zabbix-agent-2.4.8-1.el6.x86_64.rpm

Installation of the above two packages will be generated in the/ETC/ZABBIX/ZABBIX_AGENTD.D directory userparameter_mysql.conf This configuration file we just need to modify simply:

Modify the content as follows (if you only monitor the master and slave status configuration, if there are other monitoring items please refer to:http://www.cnblogs.com/fansik/p/7640942.html):

 userparameter=slave_status,/usr/local/mysql/bin/mysql-uzabbix-pzabbix-e  "  show slave status\g;   " 2  >/dev/null  | grep -e  "  Slave_io_running| slave_sql_running   " | awk   " {print $ {}   " | grep -C Yes 

2, edit the agent side of the/etc/zabbix/zabbix_agentd.conf file modify the following content:
server=127.0.0.1
Replace with: (The red font is your own server-side IP)
server=Zabbix-server-ip

3. Start Zabbix-agent Service

/etc/init.d/zabbix-agent start

To test whether the status information is properly obtained:

Zabbix_get-s 10.10.80.44-k Slave_status

4. go to Zabbix admin interface to add MySQL master-slave status monitoring

To add a host:

To define a monitoring entry:

Define the trigger, if not equal to 2 alarm:

Zabbix-2.4.8-1 adding MySQL master-slave status monitoring

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.