Zabbix Monitor MySQL warning:using a password on the command line interface can be insecure.

Source: Internet
Author: User
Tags string format

Today, when adding Zabbix to monitor 2 MySQL servers, one of the item reported the following error:

Value "warning:using a password on the command line interface can is insecure. 6158 "of type" string "is not suitable for value type" Numeric (unsigned) "

I set the value type to get the number format, 2 machines with the same template key value, but why one received is a string format.

The item in the web I set the Type of Information:numeric (unsigned)

zabbix_agentd.conf key in Userparameter=mysql.status[*],echo "show global status where Variable_name= ' $ ';" | Mysql-u Zabbix-pzabbix-n | awk ' {print $$2} '

Later found that the 2 MySQL versions are not the same ... One is 5.5 and one is 5.6.

In more than 5.6 version of the time with the MySQL-related command-p followed by the password this way there will be a warning (warning:using a password on the command line interface can be insecure.), it is uneasy anyway All right.

In this way, the Zabbix server uses the expression filter to get the numeric value, with the string, which causes the item to get the wrong type ...

Workaround:

Use 2>/dev/null to ignore this alarm in key.

Userparameter=mysql.status[*],echo "show global status where Variable_name= ' $ ';" | Mysql-u zabbix-pzabbix-n 2>/dev/null| awk ' {print $$2} '

Zabbix Monitor MySQL warning:using a password on the command line interface can be insecure.

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.