Zabbix advanced application

Source: Internet
Author: User

1. Use zabbix + Shell scripts to monitor Mysql master-slave replication. An alarm is triggered when an exception occurs in the slave database.

1.1 first authorize a monitoring account to mysql slave.

1.2 compile a script to monitor the slave database status. Use show slave status to view the slave database status. If two Yes values are displayed at the same time, the slave database is normal, otherwise, various exceptions may occur in the slave database.

1.3 Add the following content to the zabbix_agentd configuration file of the database:

Mysql. replication indicates the key value, and/etc/zabbix/replication_status.sh indicates the absolute path for storing the script.

1.4 restart the zabbix_agentd service from data.

1.4 run zabbix_get on the zabbix server to check whether the status value from data monitoring can be obtained.

1.5 configure the monitoring entry Items for mysql master-slave monitoring.

1.6 configure the Trigger for mysql master-slave monitoring, that is, an alarm is triggered when the collected status value is less than 2.

1.7 test: if you stop the mysql service of the primary database or slave stop on the slave database, zabbix will trigger an alarm.

2. Use zabbix + Shell scripts to monitor host survival and generate an alarm when the host is down.

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.