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.