Problem Description: Monitor whether the MySQL service starts properly, start MySQL if it does not start properlyWays to judge MySQL:1) port judgment[Email protected] ~]# Netstat-lntup | grep 3306tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2288/mysqld2) Process judgment[Email protected] ~]# Ps-ef |grep mysqld
MySQL Slow Log on the company line, has not been well monitored. While I was idle last week, I wrote the monitoring script, and today I specially sent out the code to share with 51 Bo friends. for script annotations and the overall idea, I'll put it behind the script and explain it to you. #!/bin/bash## This script is used to monitor MySQL slow log changes wit
Use ODBC to monitor Oracle Database (11.2.0.3) and MySQL database under Zabbix1. Monitor MySQL Database1) Installing ODBCYum-y Install UnixODBC Unixodbc-develYum Install Mysql-connector-odbc2) odbcinst-j View configuration fileUnixODBC 2.2.14DRIVERS ...:/etc/odbcinst.ini...S
Script Monitoring Database Master-Slave synchronizationSource: http://oldboy.blog.51cto.com/2561410/1632876Source:(production case): monitor MySQL master-slave synchronization is abnormal, if abnormal, send sms or mail to the administrator. Note: If there is no master-slave synchronization environment, you can use the following text in the file to read to simulate:Phase 1: Develop a daemon script to detect
Configure CACTI to monitor MySQL database statusMySQL itself is not powerful in performance monitoring, which makes many MySQL DBAs sleep at night,Fortunately, the MySQL database status is monitored through Cacti (note that monitoring is not monitoring ).With the powerful drawing function of cacti + rrdtool and dedicat
Monitor MySQL synchronization status using PythonMonitor MySQL synchronization status using Python
Using Python to monitor whether the MySQL database server is accessible and whether the master-slave synchronization is interrupted is very simple. Thanks to Python for bringin
Pt-heartbeat
Database master from replication, replication status, data latency is a very important indicator of the normal, then how to monitor it?
Pt-heartbeat is a tool set developed by Percona to monitor the replication latency of MySQL and PostgreSQL.
More mature, such as Uber and other large companies are in use.
Monitoring principle
Build a heartbeat
as follows:
*/10 * * * * root/bin/sh/root/mysql_slave.sh
Remember in each MySQL from the machine to allocate a Yuhongchun user, the permission is not OK, only limited to run locally, as follows:
Copy Code code as follows:
Grant all privileges on *.* to "Yuhongchun" @ "127.0.0.1" identified by "yuhongchun101";
Grant all privileges on *.* to "Yuhongchun" @ "localhost" identified by "yuhongchun101";
Script D
Function:
Monitor the MySQL process, the failure is restarted, if unable to start the email notification
The code is as follows:
The code is as follows
Copy Code
#!/bin/bash#/usr/bin/nmap localhost | grep 3306#lsof-i:3306mysqlport= ' Netstat-na|grep ' LISTEN "|grep" 3306″|awk-f[: ""]+ ' {print $} ' function Checkmysqlstatus () {/usr/bin/my
Tags: echo unsafe template parameter Stat NSA HTTP etc accountFirst, Zabbix with MySQL template monitoring items
The MySQL monitor template is already available after Zabbix3.0, so we just need to refer to the template Zabbixserver comes with. Zabbix default of 14 monitoring items We just need to get the values needed for the monitoring items, and most o
Using pt-heartbeat to monitor the replication latency of MySQL, pt-heartbeatmysql
Pt-heartbeat
During database master-slave replication, whether the replication status and data delay are normal is a critical indicator. How can we monitor it?
Pt-heartbeat is a centralized tool developed by PERCONA to monitor replication
Monitoring host 192.168.24.69, the following with a for the monitored host 192.168.24.79, the following with the B ID remember to import monitoring MySQL templates files in the a server cacti 1. Install Snmp#yum installed on B net-snmp#vi/etc/snmp/snmpd.conf change the following section to start the SNMPD service and join the boot task #service snmpd start#chkconfig snmpd on 2. In MySQL b to perform assigne
Tags: thread NES master user query connection and SOC uptimeAfter you install MySQL, you need to monitor the MySQL service.Nagios Open source Check_mysql is good for MySQL's slave machine monitoring. However, the database host monitoring is slightly inadequate. Use a monitoring plugin: Check_mysql_health download and use the method see:http://exchange.nagios.org
One way to monitor running MySQL is to check the status of MySQL running.(1) QPS (query amount per second)QPS = Questions (or Queries)/secondsMySQL > Show global status Like "question%";(2) TPS (transaction volume per second)TPS = (com_commit + com_rollback)/secondsMySQL > Show global status Like "Com_commit";MySQL > S
Tags: monitor mysql master-slave synchronization status is abnormalPhase 1: Develop a daemon script to detect every 30 seconds.Phase 2: If the following error number (1158,1159,1008,1007,1062) appears in sync, skip the errorPhase 3: Use array technology to implement the above script (get master-slave judgment and error number section)[[emailprotected]~]#mysql-uro
Zabbix as a monitoring software is very flexible, supporting the data types are very rich, such as digital (no plus or minus), digital (floating-point), log, text and so on. All we need to do is use the script to collect the data, then Zabbix collect and draw, and set the alarm line. Here we learn to use Zabbix to monitor memcached, PHP-FPM, Tomcat, Nginx, MySQL, and web logs. memcached MonitoringCustom Key
Configure Cacti to monitor MySQL database status
MySQL itself is not powerful in performance monitoring, which makes many MySQL DBAs sleep at night. Fortunately, the MySQL database status is monitored through Cacti (monitoring rather than monitoring.
With the powerful drawin
Remember to assign a yuhongchun user to each MySQL instance from the machine. It doesn't matter if you have more permissions. You can only run them locally, as shown below:
grant all privileges on *.* to "yuhongchun"@"127.0.0.1" identified by "yuhongchun101"; grant all privileges on *.* to "yuhongchun"@"localhost" identified by "yuhongchun101";
Script design ideas:
1. This script should be able to adapt to a variety of different Intranet and Inte
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.