Dump staring at the screen monitor MySQL ERA _php tutorial

Source: Internet
Author: User
This paper mainly studies how to use the Linux Shell script and the fetion API to realize the automatic monitoring and SMS alarm of MySQL database, which frees the DBA from the heavy and repetitive monitoring work, while enjoying the Maldives sun, sandy beach and monitoring the MySQL database in Beijing in real time.

With the rapid development of Internet and informatization, the amount of data generated by enterprise operation is increasing, so most companies choose to store important business data in the database. If the database system suddenly stop or other failure, it will inevitably affect the company's revenue, reputation and even lead to user complaints, how to ensure the normal operation of the database system, has been the company's core concerns. This requires the DBA to monitor the status of the database running in real time, resolve it before it fails, and destroy the hidden danger in the cradle. This article gives a real-time monitoring of MySQL using the "MySQL Monitor" Shell script, discusses how to implement the MySQL SMS Alarm module, and combines a real application scenario to demonstrate how "MySQL monitor" works.

  Background

  Problems encountered by southerly company

South Wind is an internet company, the company in Beijing Netcom 1 District room has 10 servers, 2 of the computer room has 10 servers, in Shanghai Telecom 1 room also has 10 servers ..., in view of the importance of company data, DBAs must implement a series of monitoring measures to ensure the healthy operation of the database, Set up 20 checkpoints, including operating system disk space checks, database tablespace checks, database table status checks, and dual-machine interoperability checks, and what options do DBAs have to implement such a big surveillance program? The following is a traditional solution:

This is an inefficient serial operation in which DBAs have to check the database server's 20 checkpoints every day from 10:00, which is time-consuming, a traditional scenario that allows DBAs to do the mechanized work every day, and when there are hundreds of monitored servers, this traditional scenario is a nightmare for DBAs, So how can a more effective monitoring database become a problem that DBAs urgently need to solve?

  South Wind's Solutions

The wisdom of MySQL needs to be mastered in a smart way. South Wind's DBA has developed a "MySQL Monitor" solution that takes advantage of the "Shell script" + "Linux Cron Timer service" + "China Mobile fetion Free SMS API interface", only to the point where the database checkpoint is problematic. The DBA sends a text message to alarm and realizes a truly unattended, large number of database server monitoring frameworks, and here's a new solution:

This is an efficient parallel way of working, in order to facilitate management, we first grouped the database server, each group of servers corresponding to a monitoring thread, and these monitoring threads deployed on the "Monitoring station", we must note that the "timeline" disappears, because these monitoring threads are run every 1 minutes, " Time Axis "has no meaning anymore. If everything is OK, these monitoring threads will only write logs, there will be no other actions, and if something happens to a database server, then the "Monitoring Station" will send SMS reminders to the DBA terminal, so that the DBA can find the problem at the first time to solve the problem, even if the DBA No computer terminal around the same can be timely to understand the operation of the MySQL server

http://www.bkjia.com/PHPjc/486461.html www.bkjia.com true http://www.bkjia.com/PHPjc/486461.html techarticle This paper mainly studies how to use the Linux Shell script and the fetion API to realize the automatic monitoring and SMS alarm of MySQL database, which frees the DBA from the heavy and repetitive monitoring work .

  • 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.