Zabbix monitoring MySQL Little note

Source: Internet
Author: User

Monitoring ideas:

First on the Zabbix host configuration of the MySQL server information, add good Zabbix the template App mysql template, and then go to the MySQL server to install the agent, and then add the MySQL monitoring script.

Host role version

192.168.1.244 Zabbix Server3.0.5

192.168.1.221 Zabbix Agent3.0.5

1, Build Zabbix Server (skip, Proxy does not consider)

2, build Zabbix agent (Skip)

3, Zabbix Agent to build MySQL (skip), add MySQL template.

4, monitor the host, select the template skip.

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/92/BC/wKioL1kCly_hjEPdAABNo37FN_g643.png "title=" 3.png "alt=" Wkiol1kcly_hjepdaabno37fn_g643.png "/>

5, Zabbix agent side configuration.

5.1) database to Zabbix user authorization (root user can also)

Grant all on * * to [e-mail protected] ' localhost ' identified by ' zabbix123 ';

Grant all on * * to [e-mail protected] ' 127.0.0.1 ' identified by ' zabbix123 ';

#grant all on * * to [e-mail protected] ' 192.168.1.244 ' identified by ' zabbix123 ';

Flush privileges;

6. MySQL Database permissions file creation.

Cd/usr/local/zabbix-3.0.5/etccat. My.cnf#zabbix agent[mysql]host=localhostuser=zabbixpassword=zabbix123socket=/ Tmp/mysql.sock[mysqladmin]host=localhostuser=zabbixpassword=zabbix123socket=/tmp/mysql.sock

7, custom monitoring MySQL template configuration. (template placed on GitHub)

CD/ROOT/ZABBIX-3.0.5/CONF/ZABBIX_AGENTDCP Userparameter_mysql.conf/usr/local/zabbix-3.0.5/etc/zabbix_ Agentd.conf.d/cd/usr/local/zabbix-3.0.5/etc/zabbix_agentd.conf.d/sed-i ' s#/var/lib/zabbix#/usr/loca/ Zabbix-3.0.5/etc#g ' userparameter_mysql.conf

There are some changes in the configuration, the specific use of good files. Note The path is the Zabbix installation path.

8, Modify the zabbix_agentd.conf configuration file.

Vim zabbix_agentd.confinclude=/usr/local/zabbix-3.0.5/etc/zabbix_agentd.conf.d/#cd/usr/local/zabbix-3.0.5/# mkdir Shell

8.1) Restart Service (note view log)

/etc/init.d/zabbix_agentd restart

9. View Monitoring

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/92/BD/wKiom1kClr3ydO8GAACVSpj3o0o455.png "style=" float : none; "title=" 1.png "alt=" Wkiom1kclr3ydo8gaacvspj3o0o455.png "/>

10. Custom Monitoring Key (GitHub has instructions and templates)

With Zabbix's custom key, combined with a shell script, you can monitor the values you want to monitor.



This article is from "Never give up!" Ningzhiyuan "blog, be sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1920303

Zabbix monitoring MySQL Little note

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.