Zabbix monitoring the MySQL setup process

Source: Internet
Author: User

Configuration of the Part1:mysql

MySQL needs a user, this user to send data to the Zabbix server, then into the MySQL, create a user, named Zabbix, then >flush privileges, refresh the permissions, and then >exit exit, Test if this Zabbix user can log in to MySQL normally.


Then find the Mysql.sock and record the path. Then create a. my.conf file in/etc/zabbix/. The contents are as follows:

#Zabbix Agent

[MySQL]

Host=localhost #主机名

User=zabbix #刚刚建立的名称

Password= Enter the password you just created #注意这里的密码要顶格写, or MySQL thinks the space is part of the password

Socket=/var/lib/mysql/mysql.sock

[Mysqladmin]

Host=localhost

User=zabbix

Password= Enter the password you just created

Socket=/var/lib/mysql/mysql.sock

MySQL has two connection methods, one is TCP/IP, the other is the Socket,mysql is the MySQL program and MySQLServer in a machine, when the local connection is used. That is why it should be specifically indicated.


This file is saved to exit.

Then #vim/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf

This conf file, by default, Home=/var/lib/zabbix, here needs to be changed into the system Zabbix the real existence of the directory, note here is not a home, but three, using: 1,$ s/var\/lib/etc/g, group replacement.


If the ZABBIX_AGENTD.D directory in the computer does not userparameter_mysql.conf this file, then find it, the default address is the/usr/share/doc/zabbix-agent-model/This directory, Copy this file and put it under the Zabbix_agentd.d file.


Configuration of the Part2:zabbix Web interface

Enter the server interface, the top bar Select "Configuration", and then click on the leftmost "host group", Find Linux, enter the host, fill in the host information, and then in the template "Link new template" Click on "Add", tick "template APP Mysql", and then Drop "select", add Update.


Then return to the main monitoring platform, the detection of---graphics, in the Graphics drop-down menu on the right there is MySQL bandwith and MySQL operation, if the client and the server side are link OK, then wait a moment, there will be an image appeared.

This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1738507

Zabbix monitoring the MySQL setup process

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.