Nagios monitoring mysql Server:1. Create a dedicated database:[Root @ svr3 ~] #/Usr/local/webserver/mysql/bin/mysql-u root-pEnter password:Welcome to the MySQL monitor. Commands end with; or \ g.Your MySQL connection id is 51910Se
Tags: monitor mysql master and slave with ZabbixMySQL Master-slave monitoring#脚本如下, intercept master and slave keywordsThe cat check_mysql_slave.sh
#!/bin/bash
# declare-a defines an array, and slave_is is treated as an array declare-a slave_is slave_is=
( $ (/data/mysql/bin/mysql-e "show slave Status\g" |grep-e "slave
Here to monitor memory usage as an example, write a simple demo program, the specific operation according to the 51reboot provided by the tutorial written as follows.
First, build a database to build a table
To create a Falcon database:
Mysql> CREATE DATABASE Falcon character set UTF8; Query OK, 1 row Affected (0.00 sec)
To create a memory monitor using the ta
There are a lot of ways to monitor MySQL under Ossim, and today the instructions are monitored under the command line. Usually you run under OSSIM5 to monitor the problem files that are missing libmysqlclient.so.15, but you do not have such problems in Ossim 2.3 and Ossim 3.0 systems.virtualusmallinone:~#/usr/lib/nagios/plugins/check_mysql-s/var/run/mysqld/mysqld
Monitor MySQLProbably logicalThere's a library where we get the ports for all the libraries,There's a table that records the IP address ports and roles for each database.Some databases are both the main library and the library (not the actual slave, but the read and write are on this, so the table is also recorded as slave)To get the data from the sun, that is, the main library and from the library as a primary library to come and go to
that the item item shows not supported,At this time, modify the Zabbix to the invalid monitoring item refresh time, the default is 600s, we changed to 30s. When the modifications are complete, they become enabled."Administration"--"general"--upper right corner Select "Other"--"Refresh Unsupported items (in sec)" to 304. Flexible use of macro variables (Macrros) for parameter configuration user name password monitoringConfiguring variables in the host(1) Modify the configuration file: [[emailpro
Tags: using python to monitor whether MySQL database is writableIf the monitoring database is writable, if your monitoring script logic is successful after writing to the database, the display is unsuccessful and then the alarm is displayed. So the problem comes, the database really can not write, your monitoring script write command will also be the MySQL hang,
Tags: edit password exists gen 3.0 png principle param AGENTD Zabbix using its own template to monitor MySQL database Yun Zhengjie Some things you don't think it's particularly difficult when you do it, but when you do it you find it so simple ~zabbix powerful I'm not here tell me more, okay? So that you can use to know, haha ... In fact, Zabbix monitoring agent side of the
Sometimes we use the PHP framework and the ready-made ORM to save the trouble of writing SQL, but we want to see which sqls have been generated. Or we have downloaded WordPress or druapl, I want to see how my SQL is written. If I can monitor every step of MySQL, it's not difficult. I just need to configure it a little and add a tool.First, open % mysqldir % My. ini (My. CnF in Linux) and add this sentence.
1, first of all, need an account to get status information1.1 Authorize an ordinary user, can login into MySQL using the-e parameter show status get1.2 can also use mysqladmin extended-status to obtain2, add a section to the scheduled task, as follows:
*/1 * * * */usr/bin/mysql-u user-h127.0.0.1-p password-e ' show status; ' >/tmp/.mysql-status.txt
3, add a key
Tags: Star int LAN demo address data format Nlog State MSYQLOne: Install and deploy MySQL in a Linux environment.Open BinlogVim/etc/my.cnfThere are 3 binlog formats for MySQL, in order to parse Binlog into JSON data format, the format of Binlog to be set to row (Binlog has three formats: Statement, row, and mixed)3 Restart MSYQL ServiceService mysqld RestartSee if Binlog is turned onSee if Binlog is turned
;}$/threads_connected$/{tc=$4;}$/threads_running$/{tr=$4;The meaning of these sentences is similar to the previous sentenceif (flag==0) {flag=1;}The flag is used here, which means nothing is done for the first analysis result, because the sentence{q=$4-lq;lq=$4;}Q=$4-LQ; The LQ in the first analysis has no valueelse {printf "%-6d%-8d%-10d%d \ n", q,c+r,tc,tr;}This is part of printing the statistical results informationHere is the script code, if you are interested, you can come down and experime
Nagios Add a custom monitoring project++++++++++++++++++++++++++++++++++++++++++++++++++++++++++System Environment: CentOS Linux release 7.2.1511 (Core)Nagios Version: 2.15Here with the Pt-dead-logger plug-in, run the plug-in, there will be a deadlock in the Test.deadlocks table to write the deadlock informationThis is done by detecting if the table has increased the number of rows to send an alarm.Nagios Client Custom Script:# # #这里为了省事, directly to the database user, password, IP address to wr
Tags: write generated bsp MySQL col alt units should be two kinds ofInput command:show variables like ' slow% ' You can find that Slow_query_log is OFF (default), indicating that the slow query log is not turned on Slow_query_log_file for slow query log file There are two ways to turn on the slow query log Method One: Temporarily open Set Global slow_query_log = on; #没有使用索引的sql将会被记录入慢查询日志 Set Global log_queries_not_using_indexes = on; SQL #查询时间大于等于
", com_select,com_insert,com_update,com_delete); \printf ("|%6d%8d%7d%7d", innodb_rows_read,innodb_rows_inserted,innodb_rows_updated,innodb_rows_deleted); \ printf ("|%10d%11d\n", INNODB_LOR,INNODB_PHR);}} '?? [Email protected] scrips]# sh mysqlstat.shWarning:using a password on the command line interface can is insecure.----------|---------|---MySQL Command Status--|-----Innodb row operation----|--Buffer Pool Read-----time---|---QPS---|select insert
Are you still ashamed to read Ho Dengcheng's lock-processing analysis article?Still in because of the master of the clerical error, into a deep confusion?As long as you have more than 5.6.16 version of MySQL, lock monitor you deserve to have!Quick StartOpenSet global Innodb_status_output=on;set global innodb_status_output_locks=on;Real:Mysql> Show CREATE TABLE My_test1_0\g1. Row ***************************T
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.