Zabbix Monitor mysql5.6 version is not out of the picture, how to do? Here are the solutions!!!

Source: Internet
Author: User


question : Today I transferred the local Zabbix to MySQL Monitor deployment system to the cloud host , found that the situation (the construction process can refer to http:// blog.51cto.com/xiaozhagn/2059430)

However, when I get the data on the cloud server Zabbix, the following warning appears (the database version being monitored is mysql5.6.x):

#zabbix_get-S 10.100.10.10-k Mysql.status[com_insert]

warning:using a password on the command line interface can is insecure.

7

can find the problem is here , This can be a nasty to me , What to do , and then I put Zabbix monitor mySQL warning , in Google, Baidu found a lot of solutions, but also tried a lot, including the following content:

1, using mysql_config_editor for no password operation.

2.Modify The my.conf configuration file and write the mysqladmin user name password to the configuration file.

Cat/usr/my.cnf

[Mysqladmin]

User=zabbix

Password=xiaozhang

3.Modify The my.conf configuration file and write the client user name password to the configuration file.

[Client]

User=zabbix

Password=xiaozhang

4, also tried to search the Zabbix server to filter the return value of the operation.

Finally found that the above method is not working, the warning has been there

Solutions and ideas:

later thought, the whole problem is because the use of the Mysqladmin command is a warning, resulting in the Zabbix server can not get the monitoring data information. So, we can ignore this warning message and throw it into the trash bin as well.

Enter theMySQL monitoring script for the Zabbix client

#vim /usr/local/zabbix/scripts/chk_mysql.sh

Add after Status 2 >/dev/null , add all

Uptime)

result= '/usr/bin/mysqladmin-u$mysql_user-h$mysql_host-s $MYSQL _sock status 2 >/dev/null |cut-f2-d ":" |cu t-f1-d "T" '

Echo $result

;;

Com_update)

result= '/usr/bin/mysqladmin-u$mysql_user-h$mysql_host-p${mysql_pwd}-S $MYSQL _sock extended-status 2 >/dev/ Null |grep-w "com_update" |cut-d "|"-f3 '

Echo $result

;;

after adding, restart the Zabbix client

#service zabbix_agentd Restart

Re-fetch data on the Zabbix server to find out that the warning is missing

#zabbix_get-S 10.100.10.10-k Mysql.status[com_insert]

7

Let's refresh the MySQL monitor in Zabbix and find that it's ready to be enabled:

Problem solving, has been able to out data, personal sharing of solutions, hope to help everyone.


Zabbix Monitor mysql5.6 version is not out of the picture, how to do? Here are the solutions!!!

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.