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

New mysq database return NULL size

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 4.4.1
    • Templates (T)
    • MySQL
    • Sprint 65 (Jun 2020)

      Steps to reproduce:

      1. Use standart template https://github.com/zabbix/zabbix/tree/master/templates/db/mysql
      2. mysql -e "create database test1;"
      3. mysql -e "SELECT SUM(DATA_LENGTH + INDEX_LENGTH) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test1'"
      4. Return NULL
      5. See latest data in web-frontend, item "Size of database test1" is not value

      Fix:

      Change in template_db_mysql.conf on:
      UserParameter=mysql.dbsize[*], mysql -h"$1" -P"$2" -sN -e "SELECT IFNULL(SUM(DATA_LENGTH + INDEX_LENGTH),0) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='$3'"

            zabbix.dev Zabbix Development Team
            cherts Mikhail Grigorev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: