Zabbix custom key monitoring MySQL master-slave synchronization Super simple!

Source: Internet
Author: User

1. In the Zabbix client configuration file, add:

First to provide MySQL with a query master-slave status account! (You can use root, of course.) )

Userparameter=mysql.replicate_error,if test ' mysql-uxxx-pxxx-h127.0.0.1-e ' show slave status\g ' | Awk-f: ' {if ($1~/slave_io_running/) print$2} ' = "Yes"-a ' mysql-uxxx-pxxx-h127.0.0.1-e ' show Slave status\g ' | Awk-f: ' {if ($1~/slave_sql_running/) print$2} ' = ' yes '; then echo 0; else Echo 1;fi

2. Create a template in the Web interface:

Create a project

Add triggers;

Add action slightly.

4. Share the key for other services:

USERPARAMETER=NGINX.STATUS,NETSTAT-TUNLP | grep 80 | grep Nginx | WC | awk ' {print '} '

USERPARAMETER=MEMCACHED.STATS,NETSTAT-TUNLP | grep 11211 | grep memcache | WC | awk ' {print '} '

Zabbix custom key monitoring MySQL master-slave synchronization Super simple!

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.