Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20901

Received Warning with MySQL by Zabbix agent and Mariadb 10.6

XMLWordPrintable

    • Sprint 90 (Jul 2022), Sprint 91 (Aug 2022)
    • 0.25

      Steps to reproduce:
      imported and configured as directed the: MySQL by Zabbix agent on Zabbix 6.0 for zabbix-agent (not zabbix-agent2)

      Result:
      Result:
      I received a whole lot of: WARNING: Forcing protocol to TCP due to option specification. Please explicitly state intended

      Expected:
      A whole log of statistics.

      I had to modify template_db_mysql.conf. After making the change detailed below everything worked. Please note the addition of the parameter --protocol=socket to most of the configuration parameters.

      From:

      ```

      #template_db_mysql.conf created by Zabbix for "Template DB MySQL" and Zabbix 4.2
      #For OS Linux: You need create .my.cnf in zabbix-agent home directory (/var/lib/zabbix by default) 
      #For OS Windows: You need add PATH to mysql and mysqladmin and create my.cnf in %WINDIR%\my.cnf,C:\my.cnf,BASEDIR\my.cnf https://dev.mysql.com/doc/refman/5.7/en/option-files.html
      #The file must have three strings:
      #[client]
      #user='zbx_monitor'
      #password='<password>'
      #
      UserParameter=mysql.ping[*], mysqladmin -h"$1" -P"$2" ping
      UserParameter=mysql.get_status_variables[*], mysql -h"$1" -P"$2" -sNX -e "show global status"
      UserParameter=mysql.version[*], mysqladmin -s -h"$1" -P"$2" version
      UserParameter=mysql.db.discovery[*], mysql -h"$1" -P"$2" -sN -e "show databases"
      UserParameter=mysql.dbsize[*], mysql -h"$1" -P"$2" -sN -e "SELECT COALESCE(SUM(DATA_LENGTH + INDEX_LENGTH),0) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='$3'"
      UserParameter=mysql.replication.discovery[*], mysql -h"$1" -P"$2" -sNX -e "show slave status"
      UserParameter=mysql.slave_status[*], mysql -h"$1" -P"$2" -sNX -e "show slave status"
      

      ```
      to

      ```

      #template_db_mysql.conf created by Zabbix for "Template DB MySQL" and Zabbix 4.2
      #For OS Linux: You need create .my.cnf in zabbix-agent home directory (/var/lib/zabbix by default) 
      #For OS Windows: You need add PATH to mysql and mysqladmin and create my.cnf in %WINDIR%\my.cnf,C:\my.cnf,BASEDIR\my.cnf https://dev.mysql.com/doc/refman/5.7/en/option-files.html
      #The file must have three strings:
      #[client]
      #user='zbx_monitor'
      #password='<password>'
      #
      UserParameter=mysql.ping[*], mysqladmin -h"$1" -P"$2" ping
      UserParameter=mysql.get_status_variables[*], mysql --protocol socket -h"$1" -P"$2" -sNX -e "show global status"
      UserParameter=mysql.version[*], mysqladmin -s -h"$1" -P"$2" version
      UserParameter=mysql.db.discovery[*], mysql --protocol socket -h"$1" -P"$2" -sN -e "show databases"
      UserParameter=mysql.dbsize[*], mysql --protocol socket -h"$1" -P"$2" -sN -e "SELECT COALESCE(SUM(DATA_LENGTH + INDEX_LENGTH),0) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='$3'"
      UserParameter=mysql.replication.discovery[*], mysql --protocol socket -h"$1" -P"$2" -sNX -e "show slave status"
      UserParameter=mysql.slave_status[*], mysql --protocol socket -h"$1" -P"$2" -sNX -e "show slave status"
      

            drasikhov Denis Rasikhov
            Wapniarski Eli
            Team A
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: