Zabbix monitoring MySQL

Source: Internet
Author: User

1. On the MySQL side (Zabbix client) modifying parameters for monitoring MySQL

[Email protected] ~]# VIM/ETC/MY.CNF
[MySQL]
Auto-rehash
user= User Name
password= Password


[Mysqladmin]
user= User Name

password= Password

Userparameter=mysql.size[*],echo ' select SUM ($ (case "$ both|" ") echo "Data_length+index_length";; Data|index) echo "$3_length";; Free) echo "Data_free";; ESAC)) from information_schema.tables$ ([["$" = "All" | |! "$"] | | echo "where Table_schema= '") $ ([[["$] =" All "| |! "$"] | | echo "and Table_name= '"); "| /usr/local/mysql-5.6.28/bin/mysql-s/tmp/mysql.sock-n

userparameter=mysql.ping,/usr/local/mysql-5.6.28/ Bin/mysqladmin-s/tmp/mysql.sock Ping | Grep-c Alive
Userparameter=mysql.version,/usr/local/mysql-5.6.28/bin/mysql-s/tmp/mysql.sock-v

[Email protected] ~]#/etc/init.d/zabbix-agent restart
Shutting down Zabbix agent: [OK]
Starting Zabbix agent: [OK]
[Email protected] ~]#

2. Test commands on the Zabbix server

[[email protected] ~]# zabbix_get-s mysql IP address---"mysql.version"
MySQL Ver 14.14 distrib 5.1.73, for Redhat-linux-gnu (x86_64) using ReadLine 5.1
[[email protected] ~]# zabbix_get-s mysql IP address--- "mysql.ping"
0
[Email protected] ~]#

3. Attach the MySQL template to the host you want to monitor on the Zabbix console

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/03/wKiom1c0KWGQGmPCAABMRyOJc4w430.png "title=" 1.png " alt= "Wkiom1c0kwgqgmpcaabmryojc4w430.png"/>


4. Drawing of drawings

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/00/wKioL1c0LNzR5i4DAACohq0LLdA674.png "title=" 2.png " alt= "Wkiol1c0lnzr5i4daacohq0llda674.png"/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/00/wKioL1c0LaehHXe4AACU5V-cDzI670.png "title=" 3.png " alt= "Wkiol1c0laehhxe4aacu5v-cdzi670.png"/>

This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1772671

Zabbix monitoring MySQL

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.